- 26 May, 2012 1 commit
-
-
gcc 4.7.0 apparently doesn't see that we won't call setenv with NULL as second argument.
Michael Schubert committed
-
- 25 May, 2012 2 commits
-
-
The error codes from failed lookups of system and global files on Windows were not consistent with the codes returned on other platforms. This makes the error detection patterns match and adds a unit test for the various errors.
Russell Belfer committed -
This fixes two bugs: * Issue #728 where git_status_file was not working for files that contain spaces. This was caused by reusing the "fnmatch" parsing code from ignore and attribute files to interpret the "pathspec" that constrained the files to apply the status to. In that code, unescaped whitespace was considered terminal to the pattern, so a file with internal whitespace was excluded from the matched files. The fix was to add a mode to that code that allows spaces and tabs inside patterns. This mode only comes into play when parsing in-memory strings. * The other issue was undetected, but it was in the recently added code to reload gitattributes / gitignores when they were changed on disk. That code was not clearing out the old values from the cached file content before reparsing which meant that newly added patterns would be read in, but deleted patterns would not be removed. The fix was to clear the vector of patterns in a cached file before reparsing the file.
Russell Belfer committed
-
- 24 May, 2012 3 commits
-
-
Russell Belfer committed
-
The function to convert UTF-16 to UTF-8 was only allocating a buffer of wcslen(utf16str) bytes for the UTF-8 string, but that is not sufficient if you have multibyte characters, and so when those occured, the conversion was failing. This updates the conversion functions to use the Win APIs to calculate the correct buffer lengths. Also fixes a comparison in the unit tests that would fail if you did not have a particular environment variable set.
Russell Belfer committed -
On Windows, we are having problems with home directories that have non-ascii characters in them. This rewrites the relevant code to fetch environment variables as UTF-16 and then explicitly map then into UTF-8 for our internal usage.
Russell Belfer committed
-
- 17 May, 2012 8 commits
-
-
Vicent Martí committed
-
Vicent Martí committed
-
Vicent Martí committed
-
Vicent Martí committed
-
Vicent Martí committed
-
nulltoken committed
-
Creating a workdir iterator on a directory with absolutely no files was returning an error (GIT_ENOTFOUND) instead of an iterator for nothing. This fixes that and includes two new tests that cover that case.
Russell Belfer committed -
There was a bug where tracked files inside directories that were inside ignored directories where not being found by status. To make that a little clearer, if you have a .gitignore with: ignore/ And then have the following files: ignore/dir/tracked <-- actually a tracked file ignore/dir/untracked <-- should be ignored Then we would show the tracked file as being removed (because when we got the to contained item "dir/" inside the ignored directory, we decided it was safe to skip -- bzzt, wrong!). This update is much more careful about checking that we are not skipping over any prefix of a tracked item, regardless of whether it is ignored or not. As documented in diff.c, this commit does create behavior that still differs from core git with regards to the handling of untracked files contained inside ignored directories. With libgit2, those files will just not show up in status or diff. With core git, those files don't show up in status or diff either *unless* they are explicitly ignored by a .gitignore pattern in which case they show up as ignored files. Needless to say, this is a local behavior difference only, so it should not be important and (to me) the libgit2 behavior seems more consistent.
Russell Belfer committed
-
- 16 May, 2012 4 commits
-
-
nulltoken committed
-
Vicent Martí committed
-
Vicent Martí committed
-
These are deprecated and replaced with the diffing code in git2/diff.h
Vicent Martí committed
-
- 15 May, 2012 1 commit
-
-
The goal of this work is to rewrite git_status_file to use the same underlying code as git_status_foreach. This is done in 3 phases: 1. Extend iterators to allow ranged iteration with start and end prefixes for the range of file names to be covered. 2. Improve diff so that when there is a pathspec and there is a common non-wildcard prefix of the pathspec, it will use ranged iterators to minimize excess iteration. 3. Rewrite git_status_file to call git_status_foreach_ext with a pathspec that covers just the one file being checked. Since ranged iterators underlie the status & diff implementation, this is actually fairly efficient. The workdir iterator does end up loading the contents of all the directories down to the single file, which should ideally be avoided, but it is pretty good.
Russell Belfer committed
-
- 14 May, 2012 3 commits
-
-
nulltoken committed
-
nulltoken committed
-
Since we now rely on it (at least under Solaris), I figured we probably want to make sure it's accurate. The new test makes sure that creating a file with a name of length FILENAME_MAX+1 fails.
Scott J. Goldman committed
-
- 13 May, 2012 5 commits
-
-
nulltoken committed
-
Carlos Martín Nieto committed
-
This function will create blobs in the object database from files anywhere on the filesystem. This can be run against bare and non-bare repositories.
nulltoken committed -
nulltoken committed
-
nulltoken committed
-
- 12 May, 2012 1 commit
-
-
Han-Wen Nienhuys committed
-
- 11 May, 2012 2 commits
-
-
object: make git_object_lookup() return GIT_ENOTFOUND when searching for an existing object by specifying an incorrect type This fix complements cb0ce16b and cover the following additional use cases - retrieving an object which has been previously searched, found and cached - retrieving an object through an non ambiguous abbreviated id
nulltoken committed -
Russell Belfer committed
-
- 10 May, 2012 2 commits
-
-
Russell Belfer committed
-
This makes the git attributes and git ignores cache check stat information before using the file contents from the cache. For cached files from the index, it checks the SHA of the file instead. This should reduce the need to ever call `git_attr_cache_flush()` in most situations. This commit also fixes the `git_status_should_ignore` API to use the libgit2 standard parameter ordering.
Russell Belfer committed
-
- 09 May, 2012 3 commits
-
-
Vicent Martí committed
-
exp() is already defined in math.h. This leads to LMSVC complaining ..\..\libgit2\tests-clar\diff\blob.c(5): error C2365: 'exp' : redefinition; previous definition was 'function' Renaming the variable fixes this issue.
nulltoken committed -
Michael Schubert committed
-
- 08 May, 2012 5 commits
-
-
When a repo is first created, there is no HEAD yet and attempting to diff files in the index was showing nothing because a tree iterator could not be constructed. This adds an "empty" iterator and falls back on that when the head cannot be looked up.
Russell Belfer committed -
Russell Belfer committed
-
Add a fetch refspec arguemnt and make the arguments (name, url, refspec), as that order makes more sense.
Carlos Martín Nieto committed -
Helper function to create a remote with the default settings
Carlos Martín Nieto committed -
nulltoken committed
-