- 12 May, 2019 1 commit
-
-
Edward Thomson committed
-
- 10 May, 2019 1 commit
-
-
This is not implemented and should fail, but it should also not leak. To allow the memory debugger to find leaks and fix this one we test this.
Heiko Voigt committed
-
- 03 May, 2019 1 commit
-
-
If someone passes just one ref (i.e. "master") and misses passing the range we should be nice and return an error code instead of crashing.
Heiko Voigt committed
-
- 26 Apr, 2019 1 commit
-
-
examples: implement SSH authentication
Patrick Steinhardt committed
-
- 17 Apr, 2019 2 commits
-
-
git_repository_init: stop traversing at windows root
Edward Thomson committed -
Stop traversing the filesystem at the Windows directory root. We were calculating the filesystem root for the given directory to create, and walking up the filesystem hierarchy. We intended to stop when the traversal path length is equal to the root path length (ie, stopping at the root, since no path may be shorter than the root path). However, on Windows, the root path may be specified in two different ways, as either `Z:` or `Z:\`, where `Z:` is the current drive letter. `git_path_dirname_r` returns the path _without_ a trailing slash, even for the Windows root. As a result, during traversal, we need to test that the traversal path is _less than or equal to_ the root path length to determine if we've hit the root to ensure that we stop when our traversal path is `Z:` and our calculated root path was `Z:\`.
Edward Thomson committed
-
- 16 Apr, 2019 9 commits
-
-
config_file: check result of git_array_alloc
Edward Thomson committed -
git_array_alloc can return NULL if no memory is available, causing a segmentation fault in memset. This adds GIT_ERROR_CHECK_ALLOC similar to how other parts of the code base deal with the return value of git_array_alloc.
Tobias Nießen committed -
patch_parse.c: Handle CRLF in parse_header_start
Patrick Steinhardt committed -
The credentials callback may be passed a username in case where the URL already includes the expected username. As we usually cannot use a different username in such context, we should use that one if provided and not ask the user for a diferent username.
Patrick Steinhardt committed -
Implement SSH key credentials. This allows users to use the SSH transport with the lg2 example code.
Patrick Steinhardt committed -
Implement SSH key credentials. This allows users to use the SSH transport with the lg2 example code.
Patrick Steinhardt committed -
Implement plain username credential types. These type of credentials might be asked for e.g. as some kind of pre-authentication step, before the actual credentials are passed.
Patrick Steinhardt committed -
Credential callback are being passed a bitset that indicates which credential types are allowed in the current context. In our examples code, we completely ignore that field and always return username/password credentials, which doesn't necessarily make sense e.g. when only SSH keys are allowed. Refactor the code and only return username/password credentials in the case where `USERPASS_PLAINTEXT` credentials are allowed. Otherwise, return a positive error code to indicate that no credentials could be acquired.
Patrick Steinhardt committed -
We currently have two locations in our examples where we define the same compatibility wrappers for MSVC. Move them into "common.h" to avoid duplication and make them available to other examples.
Patrick Steinhardt committed
-
- 07 Apr, 2019 4 commits
-
-
fix typo
Edward Thomson committed -
cheese1 committed
-
sha1: don't inline `git_hash_global_init` for win32
Edward Thomson committed -
ignore: treat paths with trailing "/" as directories
Edward Thomson committed
-
- 06 Apr, 2019 1 commit
-
-
Drew DeVault committed
-
- 05 Apr, 2019 1 commit
-
-
The function `git_ignore_path_is_ignored` is there to test the ignore status of paths that need not necessarily exist inside of a repository. This has the implication that for a given path, we cannot always decide whether it references a directory or a file, and we need to distinguish those cases because ignore rules may treat those differently. E.g. given the following gitignore file: * !/**/ we'd only want to unignore directories, while keeping files ignored. But still, calling `git_ignore_path_is_ignored("dir/")` will say that this directory is ignored because it treats "dir/" as a file path. As said, the `is_ignored` function cannot always decide whether the given path is a file or directory, and thus it may produce wrong results in some cases. While this is unfixable in the general case, we can do better when we are being passed a path name with a trailing path separator (e.g. "dir/") and always treat them as directories.
Patrick Steinhardt committed
-
- 04 Apr, 2019 6 commits
-
-
Test that largefiles can be read through the tree API
Edward Thomson committed -
Tests for symlinked user config
Edward Thomson committed -
patch_parse: fix parsing addition/deletion of file with space
Edward Thomson committed -
Edward Thomson committed
-
Optimize string comparisons
Edward Thomson committed -
Users of the Win32 hash cannot be inlined, as it uses a static struct. Don't inline it, but continue to declare the function in the header.
Edward Thomson committed
-
- 29 Mar, 2019 11 commits
-
-
romkatv committed
-
Negation of subdir ignore causes other subdirs to be unignored
Patrick Steinhardt committed -
According to reports, libgit2 is unable to read a global configuration file that is simply a symlink to the real configuration. Write a (succeeding) test that shows that libgit2 _is_ correctly able to do so.
Patrick Steinhardt committed -
While we do verify that we are able to open the global ".gitconfig" file in config::global::open_global, we never verify that we it is in fact readable. Do so by writing the global configuration file and verifying that reading from it produces the expected values.
Patrick Steinhardt committed -
We've got reports that users are unable to open repos when their global configuration ("~/.gitconfig") is a symlink. Add a test to verify that we are in fact able to do so as expected.
Patrick Steinhardt committed -
Add a test that verifies that we are able to parse patches which add a new file that has spaces in its path.
Erik Aigner committed -
The diff header format is a strange beast in that it is inherently unparseable in an unambiguous way. While parsing a/file.txt b/file.txt is obvious and trivially doable, parsing a diff header of a/file b/file ab.txt b/file b/file ab.txt is not (but in fact valid and created by git.git). Due to that, we have relaxed our diff header parser in commit 80226b5f (patch_parse: allow parsing ambiguous patch headers, 2017-09-22), so that we started to bail out when seeing diff headers with spaces in their file names. Instead, we try to use the "---" and "+++" lines, which are unambiguous. In some cases, though, we neither have a useable file name from the header nor from the "---" or "+++" lines. This is the case when we have a deletion or addition of a file with spaces: the header is unparseable and the other lines will simply show "/dev/null". This trips our parsing logic when we try to extract the prefix (the "a/" part) that is being used in the path line, where we unconditionally try to dereference a NULL pointer in such a scenario. We can fix this by simply not trying to parse the prefix in cases where we have no useable path name. That'd leave the parsed patch without either `old_prefix` or `new_prefix` populated. But in fact such cases are already handled by users of the patch object, which simply opt to use the default prefixes in that case.
Patrick Steinhardt committed -
Patrick Steinhardt committed
-
xdiff: fix typo
Patrick Steinhardt committed -
The config::global test suite creates various different directories and files which are being populated with pretend-global files. Unfortunately, the tests do not clean up after themselves, which may cause subsequent tests to fail due to cruft left behind. Fix this by always removing created directories and their contents.
Patrick Steinhardt committed -
docs: clarify relation of safe and forced checkout strategy
Edward Thomson committed
-
- 25 Mar, 2019 2 commits
-
-
Erik Aigner committed
-
Each hash implementation should define `git_hash_global_init`
Edward Thomson committed
-