- 18 Oct, 2019 1 commit
-
-
Currently, the reflog disallows any entries that have a message with newlines, as that would effectively break the reflog format, which may contain a single line per entry, only. Upstream git behaves a bit differently, though, especially when considering stashes: instead of rejecting any reflog entry with newlines, git will simply replace newlines with spaces. E.g. executing 'git stash push -m "foo\nbar"' will create a reflog entry with "foo bar" as entry message. This commit adjusts our own logic to stop rejecting commit messages with newlines. Previously, this logic was part of `git_reflog_append`, only. There is a second place though where we add reflog entries, which is the serialization code in the filesystem refdb. As it didn't contain any sanity checks whatsoever, the refdb would have been perfectly happy to write malformatted reflog entries to the disk. This is being fixed with the same logic as for the reflog itself.
Patrick Steinhardt committed
-
- 20 Jul, 2019 1 commit
-
-
Our file utils functions all have a "futils" prefix, e.g. `git_futils_touch`. One would thus naturally guess that their definitions and implementation would live in files "futils.h" and "futils.c", respectively, but in fact they live in "fileops.h". Rename the files to match expectations.
Patrick Steinhardt committed
-
- 01 Dec, 2018 1 commit
-
-
Use the new object_type enumeration names within the codebase.
Edward Thomson committed
-
- 18 Jun, 2018 1 commit
-
-
Signed-off-by: Sven Strickroth <email@cs-ware.de>
Sven Strickroth committed
-
- 11 Jun, 2018 1 commit
-
-
Edward Thomson committed
-
- 10 Jun, 2018 1 commit
-
-
Edward Thomson committed
-
- 06 Jun, 2018 1 commit
-
-
If the index contains stat data for a modified file, and the file is not racily dirty, and there exists an untracked working tree directory alphabetically after that file, and there are no other changes to the repo, then git_stash_save would fail. It would confuse the untracked working tree directory for the modified file, because they have the same sha: zero. The wt directory has a sha of zero because it's a directory, and the file would have a zero sha because we wouldn't read the file -- we would just know that it doesn't match the index. To fix this confusion, we simply check mode as well as SHA.
David Turner committed
-
- 23 Jun, 2015 1 commit
-
-
Ensure that when a file is added in the index and subsequently modified in the working directory, the stashed working directory tree contains the actual working directory contents.
Edward Thomson committed
-
- 03 Mar, 2015 2 commits
-
-
We want to use the "checkout: moving from ..." message in order to let git know when a change of branch has happened. Make the convenience functions for this goal write this message.
Carlos Martín Nieto committed -
The signature for the reflog is not something which changes dynamically. Almost all uses will be NULL, since we want for the repository's default identity to be used, making it noise. In order to allow for changing the identity, we instead provide git_repository_set_ident() and git_repository_ident() which allow a user to override the choice of signature.
Carlos Martín Nieto committed
-
- 18 Feb, 2015 1 commit
-
-
Edward Thomson committed
-
- 03 Oct, 2014 1 commit
-
-
Edward Thomson committed
-
- 24 Sep, 2014 1 commit
-
-
Jacques Germishuys committed
-
- 18 Aug, 2014 1 commit
-
-
The old `allocfmt` is of no use to callers, as they are not able to free the returned buffer. Export a new API that returns a static string that doesn't need to be freed.
Vicent Marti committed
-
- 23 Apr, 2014 1 commit
-
-
When diff finds an untracked directory, it emulates Git behavior by looking inside the directory to see if there are any untracked items inside it. If there are only ignored items inside the dir, then diff considers it ignored, even if there is no direct ignore rule for it. Checkout was not copying this behavior - when it found an untracked directory, it just treated it as untracked. Unfortunately, when combined with GIT_CHECKOUT_REMOVE_UNTRACKED, this made is seem that checkout (and stash, which uses checkout) was removing ignored items when you had only asked it to remove untracked ones. This commit moves the logic for advancing past an untracked dir while scanning for non-ignored items into an iterator helper fn, and uses that for both diff and checkout.
Russell Belfer committed
-
- 22 Apr, 2014 2 commits
-
-
Russell Belfer committed
-
To emulate git, stash should not remove untracked git repositories inside the parent repo, and checkout's REMOVE_UNTRACKED should also skip over these items. `git stash` actually prints a warning message for these items. That should be possible with a checkout notify callback if you wanted to, although it would require a bit of extra logic as things are at the moment.
Russell Belfer committed
-
- 04 Mar, 2014 1 commit
-
-
Jacques Germishuys committed
-
- 05 Feb, 2014 1 commit
-
-
Ben Straub committed
-
- 15 Jan, 2014 1 commit
-
-
Any well-behaved program should write a descriptive message to the reflog whenever it updates a reference. Let's make this more prominent by removing the version without the reflog parameters.
Carlos Martín Nieto committed
-
- 14 Nov, 2013 1 commit
-
-
Ben Straub committed
-
- 28 Sep, 2013 1 commit
-
-
Justin Spahr-Summers committed
-
- 17 Sep, 2013 2 commits
-
-
There were a lot of places in the test code base that were creating a commit from the index on the current branch. This just adds a helper to handle that case pretty easily. There was only one test where this change ended up tweaking the test data, so pretty easy and mostly just a cleanup.
Russell Belfer committed -
Unfortunately git-core uses the term "unborn branch" and "orphan branch" interchangeably. However, "orphan" is only really there for the checkout command, which has the `--orphan` option so it doesn't actually create the branch. Branches never have parents, so the distinction of a branch with no parents is odd to begin with. Crucially, the error messages deal with unborn branches, so let's use that.
Carlos Martín Nieto committed
-
- 15 Apr, 2013 1 commit
-
-
This will probably prevent many lookup/free operations in calling code.
Ben Straub committed
-
- 09 Apr, 2013 1 commit
-
-
Ben Straub committed
-
- 07 Mar, 2013 1 commit
-
-
Edward Thomson committed
-
- 12 Jan, 2013 1 commit
-
-
Edward Thomson committed
-
- 03 Jan, 2013 2 commits
-
-
Ben Straub committed
-
Ben Straub committed
-
- 27 Nov, 2012 1 commit
-
-
Ben Straub committed
-
- 23 Nov, 2012 1 commit
-
-
Without this change, any failed assertion in the second (or a later) test inside a test suite has a chance of double deleting memory, resulting in a heap corruption. See #1096 for details. This leaves alone the test cases where we "just" use cl_git_sandbox_init() and cl_git_sandbox_cleanup(). These methods already take good care to not double delete a repository. Fixes #1096
Sascha Cunz committed
-
- 10 Nov, 2012 1 commit
-
-
nulltoken committed
-
- 09 Nov, 2012 1 commit
-
-
Russell Belfer committed
-
- 30 Oct, 2012 1 commit
-
-
Edward Thomson committed
-
- 26 Oct, 2012 1 commit
-
-
nulltoken committed
-