diff options
author | Elijah Newren <newren@gmail.com> | 2011-02-28 18:08:52 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-03-02 11:55:06 -0800 |
commit | b2c8c0a762745768e8fb249949801c1aed8f7c1d (patch) | |
tree | fad1ea93798593bab3350b09ff2ae3ce7aaebaed /t/t6022-merge-rename.sh | |
parent | eeba0d1760d6922e7d6ee838b8684e87a6c0c273 (diff) | |
download | git-b2c8c0a762745768e8fb249949801c1aed8f7c1d.tar.gz |
merge-recursive: When we detect we can skip an update, actually skip it
In 882fd11 (merge-recursive: Delay content merging for renames 2010-09-20),
there was code that checked for whether we could skip updating a file in
the working directory, based on whether the merged version matched the
current working copy. Due to the desire to handle directory/file conflicts
that were resolvable, that commit deferred content merging by first
updating the index with the unmerged entries and then moving the actual
merging (along with the skip-the-content-update check) to another function
that ran later in the merge process. As part moving the content merging
code, a bug was introduced such that although the message about skipping
the update would be printed (whenever GIT_MERGE_VERBOSITY was sufficiently
high), the file would be unconditionally updated in the working copy
anyway.
When we detect that the file does not need to be updated in the working
copy, update the index appropriately and then return early before updating
the working copy.
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6022-merge-rename.sh')
-rwxr-xr-x | t/t6022-merge-rename.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t6022-merge-rename.sh b/t/t6022-merge-rename.sh index 6b3e8b8d4b..7d955c1e12 100755 --- a/t/t6022-merge-rename.sh +++ b/t/t6022-merge-rename.sh @@ -728,7 +728,7 @@ test_expect_success 'setup avoid unnecessary update, normal rename' ' git commit -m "Random, unrelated changes" ' -test_expect_failure 'avoid unnecessary update, normal rename' ' +test_expect_success 'avoid unnecessary update, normal rename' ' git checkout -q avoid-unnecessary-update-1^0 && test-chmtime =1000000000 rename && test-chmtime -v +0 rename >expect && |