tests/t18-status.c


Log

Author Commit Date CI Message
Russell Belfer 97769280 2011-11-30T11:27:15 Use git_buf for path storage instead of stack-based buffers This converts virtually all of the places that allocate GIT_PATH_MAX buffers on the stack for manipulating paths to use git_buf objects instead. The patch is pretty careful not to touch the public API for libgit2, so there are a few places that still use GIT_PATH_MAX. This extends and changes some details of the git_buf implementation to add a couple of extra functions and to make error handling easier. This includes serious alterations to all the path.c functions, and several of the fileops.c ones, too. Also, there are a number of new functions that parallel existing ones except that use a git_buf instead of a stack-based buffer (such as git_config_find_global_r that exists alongsize git_config_find_global). This also modifies the win32 version of p_realpath to allocate whatever buffer size is needed to accommodate the realpath instead of hardcoding a GIT_PATH_MAX limit, but that change needs to be tested still.
Carlos Martín Nieto 0c49ec2d 2011-11-07T19:34:24 Implement p_rename Move the callers of git_futils_mv_atomic to use p_rename. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Brodie Rao 01ad7b3a 2011-09-06T15:48:45 *: correct and codify various file permissions The following files now have 0444 permissions: - loose objects - pack indexes - pack files - packs downloaded by fetch - packs downloaded by the HTTP transport And the following files now have 0666 permissions: - config files - repository indexes - reflogs - refs This brings libgit2 more in line with Git. Note that git_filebuf_commit() and git_filebuf_commit_at() have both gained a new mode parameter. The latter change fixes an important issue where filebufs created with GIT_FILEBUF_TEMPORARY received 0600 permissions (due to mkstemp(3) usage). Now we chmod() the file before renaming it into place. Tests have been added to confirm that new commit, tag, and tree objects are created with the right permissions. I don't have access to Windows, so for now I've guarded the tests with "#ifndef GIT_WIN32".
schu ddeaa7fb 2011-09-24T13:41:10 t18-status.c: fix unused warnings Signed-off-by: schu <schu-github@schulog.org>
nulltoken afdf8dcb 2011-09-17T16:28:18 Add some forgotten asserts in the status tests
nulltoken 8320001d 2011-09-17T16:07:28 Fix a off-by-one error in the git_status_foreach tests Provided the tests fail (which they should not) and the callback is invoked too many times, this prevents the tests from segfaulting.
Vicent Marti bcba8460 2011-09-16T05:44:21 Revert changes to t18 ...Ops, I broke the old test when porting it to Clay.
Vicent Marti 11385c3c 2011-09-16T05:12:56 Add sample "Status" clay tests
nulltoken d8b903da 2011-09-11T18:46:08 status: enhance determination of statuses for a whole directory - Should increase performance through usage of a walker - No callback invocation for unaltered entries
nulltoken 56453d34 2011-09-02T13:44:42 status: enhance determination of status for a single file - fix retrieval of a file status when working against a newly initialized repository - reduce memory pressure - prevents a directory from being tested
nulltoken d4760a42 2011-07-12T11:29:36 status: refactor the tests to remove some code duplication
nulltoken 7757be33 2011-07-10T07:48:52 reflog: Fix reflog writer/reader - Use a space to separate oids and signature - Enforce test coverage - Make test run in a temporary folder in order not to alter the test repository
Vicent Marti c52736fa 2011-07-09T15:05:14 status: Cleanup The `hashfile` function has been moved to ODB, next to `git_odb_hash`. Global state has been removed from the dirent call in `status.c`, because global state is killing the rainforest and causing global warming.
Jason Penny 3b2a423c 2011-07-09T00:08:52 status: nonexistent file with git_status_file() Throws GIT_ENOTFOUND error if given a filename that is not in HEAD, index, nor the work tree.
Jason Penny 2b90cc26 2011-07-08T23:51:05 status: consolidate some test code Refactored copy of test repo to a function.
Jason Penny 34dfea27 2011-06-24T20:36:53 status: handle subdirs for git_status_file
Jason Penny 20361b2f 2011-06-23T18:51:22 status: get status for single file Add git_status_file to be able to retrieve status of single file by supplying a path.
Jason Penny 3af6b34a 2011-06-22T18:31:20 status: get file statuses and run callback Add git_status_foreach() to run a callback on each file passing the path and a status value.
Jason Penny 205166d2 2011-06-22T18:19:46 status: get blob object id of file on disk Add git_status_hashfile() to get blob's object id for a file without adding it to the object database or needing a repository at all. This functionality is similar to `git hash-object` without '-w'.