- 02 Mar, 2012 16 commits
-
-
Once I added tests for the whitespace handling options of diff, I realized that there were some bugs. This fixes those and adds the new tests into the test suite.
Russell Belfer committed -
* Implemented git_diff_index_to_tree * Reworked git_diff_options structure to handle more options * Made most of the options in git_diff_options actually work * Reorganized code a bit to remove some redundancy * Added option parsing to examples/diff.c to test most options
Russell Belfer committed -
File mode flags are not all defined on WIN32, but since git is so rigid in how it uses file modes, there is no reason not to hard code a particular value. Also, this is only used in the git_diff_print_compact helper function, so it is really really not important.
Russell Belfer committed -
This fixes several bugs, updates tests and docs, eliminates the FILE* assumption in favor of printing callbacks for the diff patch formatter helpers, and adds a "diff" example function that can perform a diff from the command line.
Russell Belfer committed -
This reworks the diff API to separate the steps of producing a diff descriptions from formatting the diff. This will allow us to share diff output code with the various diff creation scenarios and will allow us to implement rename detection as an optional pass that can be run on a diff list.
Russell Belfer committed -
This gets the basic plumbing in place for git_diff_blob. There is a known issue where additional parameters like the number of lines of context to display on the diff are not working correctly (which leads one of the new unit tests to fail).
Russell Belfer committed -
This cleans up the various GCC compiler warnings with the xdiff code that was copied in.
Russell Belfer committed -
Since casting to void works to eliminate errors with unused parameters on all platforms, avoid the various special cases. Over time, it will make sense to eliminate the GIT_UNUSED macro completely and just have GIT_UNUSED_ARG.
Russell Belfer committed -
This is the initial import of the xdiff code (LGPL) from core git as of rev f349b562086e2b7595d8a977d2734ab2ef9e71ef
Russell Belfer committed -
This is a test that should replicate an issue that Peff is setting with git attributes. But the test doesn't fail.
Russell Belfer committed -
Filters, yo
Vicent Martí committed -
This adds some initial unit tests for file filtering and fixes some simple bugs in filter application.
Russell Belfer committed -
Vicent Martí committed
-
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 9 commits
-
-
Friendlier revision walking
Vicent Martí committed -
Carlos Martín Nieto committed
-
It's not unusual to want the walker to act on HEAD, so add a convencience function for the case that the user doesn't already have a resolved HEAD reference.
Carlos Martín Nieto committed -
Carlos Martín Nieto committed
-
git_revwalk_{push,hide}_glob() lets you push the OIDs of references that match the specified glob. This is the basics for what git.git does with the rev-list options --branches, --tags, --remotes and --glob.
Carlos Martín Nieto committed -
Carlos Martín Nieto committed
-
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 3 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
-