summaryrefslogtreecommitdiff
path: root/t/t3701-add-interactive.sh
diff options
context:
space:
mode:
authorThomas Rast <trast@student.ethz.ch>2009-08-15 13:56:39 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-08-15 17:36:59 (GMT)
commit3d792161b1c86632d5331bb30d6b7c6b17261f38 (patch)
treed8f132560b20662e12e880713a5d2d7669eb332c /t/t3701-add-interactive.sh
parent87ca2eaade70519e0f4509808f662c0bb1dbcadf (diff)
downloadgit-3d792161b1c86632d5331bb30d6b7c6b17261f38.zip
git-3d792161b1c86632d5331bb30d6b7c6b17261f38.tar.gz
git-3d792161b1c86632d5331bb30d6b7c6b17261f38.tar.bz2
add -p: do not attempt to coalesce mode changes
In 0392513 (add-interactive: refactor mode hunk handling, 2009-04-16), we merged the interaction loops for mode changes and hunk staging. This was fine at the time, because 0beee4c (git-add--interactive: remove hunk coalescing, 2008-07-02) removed hunk coalescing. However, in 7a26e65 (Revert "git-add--interactive: remove hunk coalescing", 2009-05-16), we resurrected it. Since then, the code would attempt in vain to merge mode changes with diff hunks, corrupting both in the process. We add a check to the coalescing loop to ensure it only looks at diff hunks, thus skipping mode changes. Noticed-by: Kirill Smelkov <kirr@mns.spb.ru> Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3701-add-interactive.sh')
-rwxr-xr-xt/t3701-add-interactive.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh
index b68141f..63940b1 100755
--- a/t/t3701-add-interactive.sh
+++ b/t/t3701-add-interactive.sh
@@ -164,7 +164,7 @@ test_expect_success FILEMODE 'stage mode but not hunk' '
'
-test_expect_failure FILEMODE 'stage mode and hunk' '
+test_expect_success FILEMODE 'stage mode and hunk' '
git reset --hard &&
echo content >>file &&
chmod +x file &&