summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* revision: drop --show-all optionjk/cached-commit-bufferJeff King2018-02-223-42/+0
| | | | | | | | | | | | | | | | | | | | This was an undocumented debugging aid that does not seem to have come in handy in the past decade, judging from its lack of mentions on the mailing list. Let's drop it in the name of simplicity. This is morally a revert of 3131b71301 (Add "--show-all" revision walker flag for debugging, 2008-02-09), but note that I did leave in the mapping of UNINTERESTING to "^" in get_revision_mark(). I don't think this would be possible to trigger with the current code, but it's the only sensible marker. We'll skip the usual deprecation period because this was explicitly a debugging aid that was never documented. Signed-off-by: Jeff King <peff@peff.net> Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* commit: drop uses of get_cached_commit_buffer()Jeff King2018-02-222-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "--show-all" revision option shows UNINTERESTING commits. Some of these commits may be unparsed when we try to show them (since we may or may not need to walk their parents to fulfill the request). Commit 3131b71301 (Add "--show-all" revision walker flag for debugging, 2008-02-09) resolved this by just skipping pretty-printing for commits without their object contents cached, saying: Because we now end up listing commits we may not even have been parsed at all "show_log" and "show_commit" need to protect against commits that don't have a commit buffer entry. That was the easy fix to avoid the pretty-printer segfaulting, but: 1. It doesn't work for all formats. E.g., --oneline prints the oid for each such commit but not a trailing newline, leading to jumbled output. 2. It only affects some commits, depending on whether we happened to parse them or not (so if they were at the tip of an UNINTERESTING starting point, or if we happened to traverse over them, you'd see more data). 3. It unncessarily ties the decision to show the verbose header to whether the commit buffer was cached. That makes it harder to change the logic around caching (e.g., if we could traverse without actually loading the full commit objects). These days it's safe to feed such a commit to the pretty-print code. Since be5c9fb904 (logmsg_reencode: lazily load missing commit buffers, 2013-01-26), we'll load it on demand in such a case. So let's just always show the verbose headers. This does change the behavior of plumbing, but: a. The --show-all option was explicitly introduced as a debugging aid, and was never documented (and has rarely even been mentioned on the list by git devs). b. Avoiding the commits was already not deterministic due to (2) above. So the caller might have seen full headers for these commits anyway, and would need to be prepared for it. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Git 2.16.2v2.16.2Junio C Hamano2018-02-153-2/+32
| | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'ab/doc-cat-file-e-still-shows-errors' into maintJunio C Hamano2018-02-151-3/+4
|\ | | | | | | | | | | | | Doc update. * ab/doc-cat-file-e-still-shows-errors: cat-file doc: document that -e will return some output
| * cat-file doc: document that -e will return some outputab/doc-cat-file-e-still-shows-errorsÆvar Arnfjörð Bjarmason2018-01-101-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The -e option added in 7950571ad7 ("A few more options for git-cat-file", 2005-12-03) has always errored out with message on stderr saying that the provided object is malformed, like this: $ git cat-file -e malformed; echo $? fatal: Not a valid object name malformed 128 A reader of this documentation may be misled into thinking that if ! git cat-file -e "$object" [...] as opposed to: if ! git cat-file -e "$object" 2>/dev/null [...] is sufficient to implement a truly silent test that checks whether some arbitrary $object string was both valid, and pointed to an object that exists. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'as/read-tree-prefix-doc-fix' into maintJunio C Hamano2018-02-151-3/+2
|\ \ | | | | | | | | | | | | | | | | | | Doc update. * as/read-tree-prefix-doc-fix: doc/read-tree: remove obsolete remark
| * | doc/read-tree: remove obsolete remarkas/read-tree-prefix-doc-fixAndreas G. Schacker2018-01-091-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Earlier versions of `git read-tree` required the `--prefix` option value to end with a slash. This restriction was eventually lifted without a corresponding amendment to the documentation. Signed-off-by: Andreas G. Schacker <andreas.schacker@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'nd/add-i-ignore-submodules' into maintJunio C Hamano2018-02-152-1/+49
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "git add -p" was taught to ignore local changes to submodules as they do not interfere with the partial addition of regular changes anyway. * nd/add-i-ignore-submodules: add--interactive: ignore submodule changes except HEAD
| * | | add--interactive: ignore submodule changes except HEADnd/add-i-ignore-submodulesNguyễn Thái Ngọc Duy2018-01-162-1/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For 'add -i' and 'add -p', the only action we can take on a dirty submodule entry is update the index with a new value from its HEAD. The content changes inside (from its own index, untracked files...) do not matter, at least until 'git add -i' learns about launching a new interactive add session inside a submodule. Ignore all other submodules changes except HEAD. This reduces the number of entries the user has to check through in 'git add -i', and the number of 'no' they have to answer to 'git add -p' when dirty submodules are present. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'tg/stash-with-pathspec-fix' into maintJunio C Hamano2018-02-152-3/+34
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "git stash -- <pathspec>" incorrectly blew away untracked files in the directory that matched the pathspec, which has been corrected. * tg/stash-with-pathspec-fix: stash: don't delete untracked files that match pathspec
| * | | | stash: don't delete untracked files that match pathspectg/stash-with-pathspec-fixThomas Gummerer2018-01-082-3/+34
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently when 'git stash push -- <pathspec>' is used, untracked files that match the pathspec will be deleted, even though they do not end up in a stash anywhere. This is because the original commit introducing the pathspec feature in git stash push (df6bba0937 ("stash: teach 'push' (and 'create_stash') to honor pathspec", 2017-02-28)) used the sequence of 'git reset <pathspec> && git ls-files --modified <pathspec> | git checkout-index && git clean <pathspec>'. The intention was to emulate what 'git reset --hard -- <pathspec>' would do. The call to 'git clean' was supposed to clean up the files that were unstaged by 'git reset'. This would work fine if the pathspec doesn't match any files that were untracked before 'git stash push -- <pathspec>'. However if <pathspec> matches a file that was untracked before invoking the 'stash' command, all untracked files matching the pathspec would inadvertently be deleted as well, even though they wouldn't end up in the stash, and are therefore lost. This behaviour was never what was intended, only blobs that also end up in the stash should be reset to their state in HEAD, previously untracked files should be left alone. To achieve this, first match what's in the index and what's in the working tree by adding all changes to the index, ask diff-index what changed between HEAD and the current index, and then apply that patch in reverse to get rid of the changes, which includes removal of added files and resurrection of removed files. Reported-by: Reid Price <reid.price@gmail.com> Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'jk/abort-clone-with-existing-dest' into maintJunio C Hamano2018-02-152-33/+98
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "git clone $there $here" is allowed even when here directory exists as long as it is an empty directory, but the command incorrectly removed it upon a failure of the operation. * jk/abort-clone-with-existing-dest: clone: do not clean up directories we didn't create clone: factor out dir_exists() helper t5600: modernize style t5600: fix outdated comment about unborn HEAD
| * | | | clone: do not clean up directories we didn't createjk/abort-clone-with-existing-destJeff King2018-01-032-9/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Once upon a time, git-clone would refuse to write into a directory that it did not itself create. The cleanup routines for a failed clone could therefore just remove the git and worktree dirs completely. In 55892d2398 (Allow cloning to an existing empty directory, 2009-01-11), we learned to write into an existing directory. Which means that doing: mkdir foo git clone will-fail foo ends up deleting foo. This isn't a huge catastrophe, since by definition foo must be empty. But it's somewhat confusing; we should leave the filesystem as we found it. Because we know that the only directory we'll write into is an empty one, we can handle this case by just passing the KEEP_TOPLEVEL flag to our recursive delete (if we could write into populated directories, we'd have to keep track of what we wrote and what we did not, which would be much harder). Note that we need to handle the work-tree and git-dir separately, though, as only one might exist (and the new tests in t5600 cover all cases). Reported-by: Stephan Janssen <sjanssen@you-get.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | clone: factor out dir_exists() helperJeff King2018-01-031-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two parts of git-clone's setup logic check whether a directory exists, and they both call stat directly with the same scratch "struct stat" buffer. Let's pull that into a helper, which has a few advantages: - it makes the purpose of the stat calls more obvious - it makes it clear that we don't care about the information in "buf" remaining valid - if we later decide to make the check more robust (e.g., complaining about non-directories), we can do it in one place Note that we could just use file_exists() for this, which has identical code. But we specifically care about directories, so this future-proofs us against that function later getting more picky about seeing actual files. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | t5600: modernize styleJeff King2018-01-031-23/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an old script which could use some updating before we add to it: - use the standard line-breaking: test_expect_success 'title' ' body ' - run all code inside test_expect blocks to catch unexpected failures in setup steps - use "test_commit -C" instead of manually entering sub-repo - use test_when_finished for cleanup steps - test_path_is_* as appropriate Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | t5600: fix outdated comment about unborn HEADJeff King2018-01-031-1/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Back when this test was written, git-clone could not handle a repository without any commits. These days it works fine, and this comment is out of date. At first glance it seems like we could just drop this code entirely now, but it's necessary for the final test, which was added later. That test corrupts the repository by temporarily removing its objects, which means we need to have some objects to move. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'jc/merge-symlink-ours-theirs' into maintJunio C Hamano2018-02-152-4/+45
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "git merge -Xours/-Xtheirs" learned to use our/their version when resolving a conflicting updates to a symbolic link. * jc/merge-symlink-ours-theirs: merge: teach -Xours/-Xtheirs to symbolic link merge
| * | | | merge: teach -Xours/-Xtheirs to symbolic link mergejc/merge-symlink-ours-theirsJunio C Hamano2018-01-032-4/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The -Xours/-Xtheirs merge options were originally defined as a way to "force" the resolution of 3way textual merge conflicts to take one side without using your editor, hence did not even trigger in situations where you would normally not get the <<< === >>> conflict markers. This was improved for binary files back in 2012 with a944af1d ("merge: teach -Xours/-Xtheirs to binary ll-merge driver", 2012-09-08). Teach a similar trick to the codepath that deals with merging two conflicting changes to symbolic links. Signed-off-by: Junio C Hamano <gitster@pobox.com> Tested-by: Yaroslav Halchenko <yoh@onerussian.com> Reviewed-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'rs/lose-leak-pending' into maintJunio C Hamano2018-02-1510-86/+46
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | API clean-up around revision traversal. * rs/lose-leak-pending: commit: remove unused function clear_commit_marks_for_object_array() revision: remove the unused flag leak_pending checkout: avoid using the rev_info flag leak_pending bundle: avoid using the rev_info flag leak_pending bisect: avoid using the rev_info flag leak_pending object: add clear_commit_marks_all() ref-filter: use clear_commit_marks_many() in do_merge_filter() commit: use clear_commit_marks_many() in remove_redundant() commit: avoid allocation in clear_commit_marks_many()
| * | | | | commit: remove unused function clear_commit_marks_for_object_array()rs/lose-leak-pendingRené Scharfe2017-12-282-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | revision: remove the unused flag leak_pendingRené Scharfe2017-12-282-14/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | checkout: avoid using the rev_info flag leak_pendingRené Scharfe2017-12-281-12/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The leak_pending flag is so awkward to use that multiple comments had to be added around each occurrence. We only use it for remembering the commits whose marks we have to clear after checking if the old HEAD is detached. This is easy, though: We need to do that for the old commit, the new one -- and for all refs. Don't bother tracking exactly which commits need their flags cleared, just nuke all we have in-core. This change is safe because refs can point at anything, so other program parts can't depend on any kept flags anyway. And since all refs are loaded we have to basically deal with all commits anyway, so performance should not be negatively impacted. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | bundle: avoid using the rev_info flag leak_pendingRené Scharfe2017-12-281-19/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The leak_pending flag is so awkward to use that multiple comments had to be added around each occurrence. We use it for remembering the prerequisites for the bundle. That is easy, though: We have the ref_list named "prerequisites" in the header for just that purpose. Use this original list of prerequisites to check if all of them are present and to clear their commit marks afterward. The two new loops are intentionally kept similar to the first one in the function. Calling parse_object() a second time is expected be quick and successful in each case -- any errors should have been handled in the first round. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | bisect: avoid using the rev_info flag leak_pendingRené Scharfe2017-12-281-21/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The leak_pending flag is so awkward to use that multiple comments had to be added around each occurrence. We only use it for remembering the commits whose marks we have to clear after checking if all of the good ones are ancestors of the bad one. This is easy, though: We need to do that for the bad and good commits, of course. Let check_good_are_ancestors_of_bad() create and own the array of bad and good commits, and use it to clear the commit marks as well. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | object: add clear_commit_marks_all()René Scharfe2017-12-282-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a function for clearing the commit marks of all in-core commit objects. It's similar to clear_object_flags(), but more precise, since it leaves the other object types alone. It still has to iterate through them, though. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | ref-filter: use clear_commit_marks_many() in do_merge_filter()René Scharfe2017-12-281-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | commit: use clear_commit_marks_many() in remove_redundant()René Scharfe2017-12-281-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | commit: avoid allocation in clear_commit_marks_many()René Scharfe2017-12-281-1/+1
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass the entries of the commit array directly to clear_commit_marks_1() instead of adding them to a commit_list first. The function clears the commit and any first parent without allocation; only higher numbered parents are added to a list for later treatment. This change extends that optimization to clear_commit_marks_many(). Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'jm/svn-pushmergeinfo-fix' into maintJunio C Hamano2018-02-151-0/+1
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "git svn dcommit" did not take into account the fact that a svn+ssh:// URL with a username@ (typically used for pushing) refers to the same SVN repository without the username@ and failed when svn.pushmergeinfo option is set. * jm/svn-pushmergeinfo-fix: git-svn: fix svn.pushmergeinfo handling of svn+ssh usernames.
| * | | | | git-svn: fix svn.pushmergeinfo handling of svn+ssh usernames.jm/svn-pushmergeinfo-fixJason Merrill2017-09-171-0/+1
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, svn dcommit of a merge with svn.pushmergeinfo set would get error messages like "merge parent <X> for <Y> is on branch svn+ssh://gcc.gnu.org/svn/gcc/trunk, which is not under the git-svn root svn+ssh://jason@gcc.gnu.org/svn/gcc!" So, let's call remove_username (as we do for svn info) before comparing rooturl to branchurl. Signed-off-by: Jason Merrill <jason@redhat.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'dk/describe-all-output-fix' into maintJunio C Hamano2018-02-152-3/+10
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An old regression in "git describe --all $annotated_tag^0" has been fixed. * dk/describe-all-output-fix: describe: prepend "tags/" when describing tags with embedded name
| * | | | | describe: prepend "tags/" when describing tags with embedded namedk/describe-all-output-fixDaniel Knittl-Frank2017-12-272-3/+10
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The man page of the "git describe" command explains the expected output when using the --all option, i.e. the full reference path is shown, including heads/ or tags/ prefix. When 212945d4a85dfa172ea55ec73b1d830ef2d8582f ("Teach git-describe to verify annotated tag names before output") made Git favor the embedded name of annotated tags, it accidentally changed the output format when the --all flag is given, only printing the tag's name without the prefix. Check if --all was specified and re-add the "tags/" prefix for this special case to fix the regresssion. Signed-off-by: Daniel Knittl-Frank <knittl89+git@googlemail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'ab/perf-grep-threads' into maintJunio C Hamano2018-02-152-21/+86
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | More perf tests for threaded grep * ab/perf-grep-threads: perf: amend the grep tests to test grep.threads
| * | | | | perf: amend the grep tests to test grep.threadsab/perf-grep-threadsÆvar Arnfjörð Bjarmason2018-01-042-21/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ever since 5b594f457a ("Threaded grep", 2010-01-25) the number of threads git-grep uses under PTHREADS has been hardcoded to 8, but there's no performance test to check whether this is an optimal setting. Amend the existing tests for the grep engines to support a mode where this can be tested, e.g.: GIT_PERF_GREP_THREADS='1 8 16' GIT_PERF_LARGE_REPO=~/g/linux ./run p782* Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Git 2.16.1v2.16.1Junio C Hamano2018-01-213-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Merge branch 'bc/hash-algo' into maintJunio C Hamano2018-01-212-1/+18
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bc/hash-algo: t5601-clone: test case-conflicting files on case-insensitive filesystem repository: pre-initialize hash algo pointer
| * | | | | | t5601-clone: test case-conflicting files on case-insensitive filesystemEric Sunshine2018-01-211-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A recently introduced regression caused a segfault at clone time on case-insensitive filesystems when filenames differing only in case are present. This bug has already been fixed (repository: pre-initialize hash algo pointer, 2018-01-18), but it's not the first time similar problems have arisen. Therefore, introduce a test to catch this case and protect against future regressions. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | repository: pre-initialize hash algo pointerbrian m. carlson2018-01-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are various git subcommands (among them, clone) which don't set up the repository (that is, they lack RUN_SETUP or RUN_SETUP_GENTLY) but end up needing to have information about the hash algorithm in use. Because the hash algorithm is part of struct repository and it's only initialized in repository setup, we can end up dereferencing a NULL pointer in some cases if we call one of these subcommands and look up the empty blob or empty tree values. A "git clone" of a project that has two paths that differ only in case suffers from this if it is run on a case insensitive platform. When the command attempts to check out one of these two paths after checking out the other one, the checkout codepath needs to see if the version that is already on the filesystem (which should not happen if the FS were case sensitive) is dirty, and it needs to exercise the hashing code at that point. In the future, we can add a command line option for this or read it from the configuration, but until we're ready to expose that functionality to the user, simply initialize the repository structure to use the current hash algorithm, SHA-1. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | Git 2.16v2.16.0Junio C Hamano2018-01-172-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | Merge tag 'l10n-2.16.0-rnd2' of git://github.com/git-l10n/git-poJunio C Hamano2018-01-1612-20028/+22202
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | l10n for Git 2.16.0 round 2 * tag 'l10n-2.16.0-rnd2' of git://github.com/git-l10n/git-po: (24 commits) l10n: de.po: translate 72 new messages l10n: de.po: improve messages when a branch starts to track another ref l10n: bg.po: Updated Bulgarian translation (3288t) l10n: TEAMS: add zh_CN team members l10n: zh_CN: for git v2.16.0 l10n round 2 l10n: sv.po: Update Swedish translation (3288t0f0u) l10n: ru.po: update Russian translation l10n: TEAMS: Add ko team members l10n: ko.po: Update Korean translation l10n: fr.po 2.16 round 2 l10n: es.po: Spanish translation 2.16.0 round 2 l10n: vi.po(3288t): Updated Vietnamese translation for v2.16.0 round 2 l10n: git.pot: v2.16.0 round 2 (8 new, 4 removed) l10n: es.po: Update Spanish Translation v2.16.0 l10n: fr.po v2.16.0 round 1 l10n: bg.po: Updated Bulgarian translation (3284t) l10n: sv.po: Update Swedish translation (3284t0f0u) l10n: fr.po: "worktree list" mistranslated as prune l10n: git.pot: v2.16.0 round 1 (64 new, 25 removed) l10n: fixes to German translation ...
| * | | | | | | l10n: de.po: translate 72 new messagesRalf Thielow2018-01-151-1934/+2172
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Translate 72 new messages came from git.pot update in 18a907225 (l10n: git.pot: v2.16.0 round 1 (64 new, 25 removed)) and 005c62fe4 (l10n: git.pot: v2.16.0 round 2 (8 new, 4 removed)). Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com> Acked-by: Matthias Rüster <matthias.ruester@gmail.com>
| * | | | | | | l10n: de.po: improve messages when a branch starts to track another refRalf Thielow2018-01-151-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
| * | | | | | | l10n: bg.po: Updated Bulgarian translation (3288t)Alexander Shopov2018-01-111-181/+203
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Alexander Shopov <ash@kambanaria.org>
| * | | | | | | l10n: TEAMS: add zh_CN team membersJiang Xin2018-01-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add Fangyi Zhou to zh_CN l10n team members. Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
| * | | | | | | l10n: zh_CN: for git v2.16.0 l10n round 2Jiang Xin2018-01-101-1920/+2144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Translate 72 messages (3288t0f0u) for git v2.16.0-rc1. Signed-off-by: Jiang Xin <worldhello.net@gmail.com> Reviewed-by: 依云 <lilydjwg@gmail.com> Reviewed-by: Fangyi Zhou <fangyi.zhou@yuriko.moe>
| * | | | | | | Merge branch 'master' of git://github.com/nafmo/git-l10n-svJiang Xin2018-01-101-181/+197
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'master' of git://github.com/nafmo/git-l10n-sv: l10n: sv.po: Update Swedish translation (3288t0f0u)
| | * | | | | | | l10n: sv.po: Update Swedish translation (3288t0f0u)Peter Krefting2018-01-091-181/+197
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
| * | | | | | | | Merge branch 'russian-l10n' of https://github.com/DJm00n/git-po-ruJiang Xin2018-01-101-1918/+2092
| |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'russian-l10n' of https://github.com/DJm00n/git-po-ru: l10n: ru.po: update Russian translation
| | * | | | | | | | l10n: ru.po: update Russian translationDimitriy Ryazantcev2018-01-091-1918/+2092
| | |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Dimitriy Ryazantcev <dimitriy.ryazantcev@gmail.com>
| * | | | | | | | l10n: TEAMS: Add ko team membersChangwoo Ryu2018-01-091-0/+2
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add Gwan-gyeong Mun and Sihyeon Jang. Signed-off-by: Changwoo Ryu <cwryu@debian.org>