- 02 Mar, 2012 3 commits
-
-
Vicent Martí committed
-
Vicent Martí committed
-
The point of having `GIT_ATTR_TRUE` and `GIT_ATTR_FALSE` macros is to be able to change the way that true and false values are stored inside of the returned gitattributes value pointer. However, if these macros are implemented as a simple rename for the `git_attr__true` pointer, they will always be used with the `==` operator, and hence we cannot really change the implementation to any other way that doesn't imply using special pointer values and comparing them! We need to do the same thing that core Git does, which is using a function macro. With `GIT_ATTR_TRUE(attr)`, we can change internally the way that these values are stored to anything we want. This commit does that, and rewrites a large chunk of the attributes test suite to remove duplicated code for expected attributes, and to properly test the function macro behavior instead of comparing pointers.
Vicent Martí committed
-
- 01 Mar, 2012 3 commits
-
-
Comments soothe my soul.
Vicent Martí committed -
Vicent Martí committed
-
Vicent Martí committed
-
- 29 Feb, 2012 2 commits
-
-
Sane API for real-world usage.
Vicent Martí committed -
Vicent Martí committed
-
- 28 Feb, 2012 1 commit
-
-
Vicent Martí committed
-
- 27 Feb, 2012 3 commits
-
-
Vicent Martí committed
-
Initial implementation. The relevant code is in `blob.c`: the blob write function has been split into smaller functions. - Directly write a file to the ODB in streaming mode - Directly write a symlink to the ODB in direct mode - Apply a filter, and write a file to the ODB in direct mode When trying to write a file, we first call `git_filter__load_for_file`, which populates a filters array with the required filters based on the filename. If no filters are resolved to the filename, we can write to the ODB in streaming mode straight from disk. Otherwise, we load the whole file in memory and use double-buffering to apply the filter chain. We finish by writing the file as a whole to the ODB.
Vicent Martí committed -
This makes so much sense that I can't believe it hasn't been done before. Kill the old `git_fbuffer` and read files straight into `git_buf` objects. Also: In order to fully support 4GB files in 32-bit systems, the `git_buf` implementation has been changed from using `ssize_t` for storage and storing negative values on allocation failure, to using `size_t` and changing the buffer pointer to a magical pointer on allocation failure. Hopefully this won't break anything.
Vicent Martí committed
-
- 26 Feb, 2012 2 commits
-
-
Add git_remote_list()
Vicent Martí committed -
Loops through the configuration and generates a list of configured remotes.
Carlos Martín Nieto committed
-
- 25 Feb, 2012 2 commits
-
-
Carlos Martín Nieto committed
-
We used to erroneously consider "^$" as a special case for appending a value to a multivar. This was a misunderstanding and we should always append a value if there are no existing values that match. While we're in the area, replace all the variables in-memory in one swoop and then replace them on disk so as to avoid matching a value we've just introduced.
Carlos Martín Nieto committed
-
- 24 Feb, 2012 2 commits
-
-
We used to consider it an error if a remote didn't have at least a fetch refspec. This was too much checking, as a remote doesn't in fact need to have anything other than an URL configured to be considered a remote.
Carlos Martín Nieto committed -
Making a commit that results in a blob that already exists in the ODB (i.e. committing something, then making a revert commit) will result in us trying to p_rename -> MoveFileExW a temp file into the existing ODB entry. Despite the MOVEFILE_REPLACE_EXISTING flag is passed in, Win32 does not care and fails it with STATUS_ACCESS_DENIED. To fix this, we p_unlink the ODB entry before attempting to rename it. This call will typically fail, but we don't care, we'll let the p_rename fail if the file actually does exist and we couldn't delete it for some reason (ACLs, etc).
Paul Betts committed
-
- 23 Feb, 2012 9 commits
-
-
tests-clar/notes: init oid before using
Vicent Martí committed -
Reported-by: Carlos Martín Nieto <carlos@cmartin.tk> Signed-off-by: schu <schu-github@schulog.org>
schu committed -
If write_tree() returs an error, we used to set the error message and continued looping. Exit the loop so we return the error.
Carlos Martín Nieto committed -
This test is fragile if you leave extra files in the test data directory, such as a foo.c~ file from editing with Emacs. Who would do such a thing?
Russell Belfer committed -
This fixes the missing readdir_r from win32 and fixes other platforms to always use the reentrant readdir_r form for reading directory contents.
Russell Belfer committed -
Russell Belfer committed
-
Fix -Wuninitialized warning
Vicent Martí committed -
Signed-off-by: schu <schu-github@schulog.org>
schu committed -
Uniform iterators for trees, index, and workdir
Vicent Martí committed
-
- 22 Feb, 2012 5 commits
-
-
This update addresses all of the feedback in pull request #570. The biggest change was to create actual linked list stacks for storing the tree and workdir iterator state. This cleaned up the code a ton. Additionally, all of the static functions had their 'git_' prefix removed, and a lot of other unnecessary changes were removed from the original patch.
Russell Belfer committed -
This makes two changes to iterator behavior: first, advance can optionally do the work of returning the new current value. This is such a common pattern that it really cleans up usage. Second, for workdir iterators, this removes automatically iterating into directories. That seemed like a good idea, but when an entirely new directory hierarchy is introduced into the workdir, there is no reason to iterate into it if there are no corresponding entries in the tree/index that it is being compared to. This second change actually wasn't a lot of code because not descending into directories was already the behavior for ignored directories. This just extends that to all directories.
Russell Belfer committed -
Add config multivar support
Vicent Martí committed -
Export parse_tag_buffer as git_tag__parse_buffer.
Vicent Martí committed -
Jay Freeman (saurik) committed
-
- 21 Feb, 2012 2 commits
-
-
This create a new git_iterator type of object that provides a uniform interface for iterating over the index, an arbitrary tree, or the working directory of a repository. As part of this, git ignore support was extended to support push and pop of directory-based ignore files as the working directory is being traversed (so the array of ignores does not have to be recreated at each directory during traveral). There are a number of other small utility functions in buffer, path, vector, and fileops that are included in this patch that made the iterator implementation cleaner.
Russell Belfer committed -
Fix copy-paste error
Carlos Martín Nieto committed
-
- 20 Feb, 2012 4 commits
-
-
Remotes improvements
Vicent Martí committed -
Carlos Martín Nieto committed
-
Carlos Martín Nieto committed
-
Allow setting the fetch and push refspecs, which is useful for creating new refspecs.
Carlos Martín Nieto committed
-
- 18 Feb, 2012 2 commits
-
-
Carlos Martín Nieto committed
-
Carlos Martín Nieto committed
-