- 08 Jun, 2017 1 commit
-
-
The function `git_buf_try_grow` consistently calls `giterr_set_oom` whenever growing the buffer fails due to insufficient memory being available. So in fact, we do not have to do this ourselves when a call to any buffer-growing function has failed due to an OOM situation. But we still do so in two functions, which this patch cleans up.
Patrick Steinhardt committed
-
- 04 Jun, 2017 4 commits
-
-
Edward Thomson committed
-
Edward Thomson committed
-
Fix issue with directory glob ignore in subdirectories
Edward Thomson committed -
Submodule working directory
Edward Thomson committed
-
- 20 May, 2017 4 commits
-
-
Introduce home directory expansion function for config files, attribute files
Carlos Martín Nieto committed -
Fix proxy auto detect not utilizing callbacks
Carlos Martín Nieto committed -
git_repository_set_head: use tag name in reflog
Carlos Martín Nieto committed -
revparse: support open-ended ranges
Carlos Martín Nieto committed
-
- 19 May, 2017 4 commits
-
-
To determine if a repository is a worktree or not, we currently check for the existence of a "gitdir" file inside of the repository's gitdir. While this is sufficient for non-broken repositories, we have at least one case of a subtly broken repository where there exists a gitdir file inside of a gitmodule. This will cause us to misidentify the submodule as a worktree. While this is not really a fault of ours, we can do better here by observing that a repository can only ever be a worktree iff its common directory and dotgit directory are different. This allows us to make our check whether a repo is a worktree or not more strict by doing a simple string comparison of these two directories. This will also allow us to do the right thing in the above case of a broken repository, as for submodules these directories will be the same. At the same time, this allows us to skip the `stat` check for the "gitdir" file for most repositories.
Patrick Steinhardt committed -
The check whether a repository is a worktree or not is currently done inside of `git_repository_open_ext`. As we want to extend this function later on, pull it out into its own function `repo_is_worktree` to ease working on it.
Patrick Steinhardt committed -
The out-parameters of `find_repo` containing found paths of a repository are a tad confusing, as they are not as obvious as they could be. Rename them like following to ease reading the code: - `repo_path` -> `gitdir_path` - `parent_path` -> `workdir_path` - `link_path` -> `gitlink_path` - `common_path` -> `commondir_path`
Patrick Steinhardt committed -
The `path` out-parameter of `find_repo` is being sanitized initially such that we do not try to append to existing content. The sanitization is done via `git_buf_free`, though, which forces us to needlessly reallocate the buffer later in the function. Fix this by using `git_buf_clear` instead.
Patrick Steinhardt committed
-
- 17 May, 2017 2 commits
-
-
Robert Gay committed
-
Patrick Steinhardt committed
-
- 16 May, 2017 1 commit
-
-
Fix GCC warnings
Carlos Martín Nieto committed
-
- 15 May, 2017 5 commits
-
-
Patrick Steinhardt committed
-
Patrick Steinhardt committed
-
The fields `declared_size` and `received_bytes` of the `git_odb_stream` are both of type `git_off_t` which is defined as a signed integer. When passing these values to a printf-style string in `git_odb_stream__invalid_length`, though, we format these as PRIuZ, which is unsigned. Fix the issue by using PRIdZ instead, silencing warnings on macOS.
Patrick Steinhardt committed -
The credentials callback reads the username and password via scanf into fixed-length arrays. While these are simply examples and as such not as interesting, the unchecked return value of scanf causes GCC to emit warnings. So while we're busy to shut up GCC, we also fix the possible overflow of scanf by using getline instead.
Patrick Steinhardt committed -
The `error` variable is used as a return value in the out-section of both `odb_read_1` and `read_prefix_1`. While the value will actually always be initialized inside of this section, GCC fails to realize this due to interactions with the `found` variable: if `found` is set, the error will always be initialized. If it is not, we return early without reaching the out-statements. Shut up the warnings by initializing the error variable, even though it is unnecessary.
Patrick Steinhardt committed
-
- 11 May, 2017 2 commits
-
-
Update README: VS -> VSTS
Carlos Martín Nieto committed -
libgit2 is no longer used in Visual Studio Team Services, it's used in Visual Studio Team Services.
Edward Thomson committed
-
- 05 May, 2017 3 commits
-
-
Support '..' and '...' ranges where one side is not specified. The unspecified side defaults to HEAD. Closes #4223
William Bain committed -
The current signature of `git_worktree_prune` accepts a flags field to alter its behavior. This is not as flexible as we'd like it to be when we want to enable passing additional options in the future. As the function has not been part of any release yet, we are still free to alter its current signature. This commit does so by using our usual pattern of an options structure, which is easily extendable without breaking the API.
Patrick Steinhardt committed -
When creating a new worktree, we do have a potential race with us creating the worktree and another process trying to delete the same worktree as it is being created. As such, the upstream git project has introduced a flag `git worktree add --locked`, which will cause the newly created worktree to be locked immediately after its creation. This mitigates the race condition. We want to be able to mirror the same behavior. As such, a new flag `locked` is added to the options structure of `git_worktree_add` which allows the user to enable this behavior.
Patrick Steinhardt committed
-
- 04 May, 2017 1 commit
-
-
tests: repo: fix repo discovery tests on overlayfs
Edward Thomson committed
-
- 03 May, 2017 1 commit
-
-
Debian and Ubuntu often use schroot to build their DEB packages in a controlled environment. Depending on how schroot is configured, our tests regarding repository discovery break due to not being able to find the repositories anymore. It turns out that these errors occur when the schroot is configured to use an overlayfs on the directory structures. The reason for this failure is that we usually refrain from discovering repositories across devices. But unfortunately, overlayfs does not have consistent device identifiers for all its files but will instead use the device number of the filesystem the file stems from. So whenever we cross boundaries between the upper and lower layer of the overlay, we will fail to properly detect the repository and bail out. This commit fixes the issue by enabling cross-device discovery in our tests. While it would be preferable to have this turned off, it probably won't do much harm anyway as we set up our tests in a temporary location outside of the parent repository.
Patrick Steinhardt committed
-
- 02 May, 2017 5 commits
-
-
libssh2 shutdown
Edward Thomson committed -
After calling `libssh2_init`, we need to clean up after the library by executing `libssh2_exit` as soon as we exit. Register a shutdown handler to do so which simply calls `libssh2_exit`. This fixes several memory leaks.
Patrick Steinhardt committed -
We unconditionally return success when initializing libssh2, regardless of whether `libgssh2_init` signals success or an error. Fix this by checking its return code.
Patrick Steinhardt committed -
The `git_worktree_add` function currently accepts only a path and name for the new work tree. As we may want to expand these parameters in future versions without adding additional parameters to the function for every option, this commit introduces our typical pattern of an options struct. Right now, this structure is still empty, which will change with the next commit.
Patrick Steinhardt committed -
WIP: squash some memleaks
Edward Thomson committed
-
- 01 May, 2017 7 commits
-
-
Edward Thomson committed
-
Edward Thomson committed
-
This reverts commit 55522376 and frees the snapshot properly.
Edward Thomson committed -
Be sure to clean up looked up references. Free buffers instead of merely clearing them. Use `git__free` instead of `free`.
Edward Thomson committed -
Verify object hashes
Edward Thomson committed -
transport: provide a getter for the proxy options
Edward Thomson committed -
Debian HTTPS feature test failure
Edward Thomson committed
-