summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-08-01 22:00:08 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-08-01 22:00:08 (GMT)
commit1df561fb4861708ce208488aa307516c0ecfa968 (patch)
treed642bff3822cc638967d3fc6c54d2060e21ec0cf /t
parent259bcfb6b987021be592ed640253215bcbbf6d7d (diff)
parentff00b682f203eb39876b57404916b4c54b6032c6 (diff)
downloadgit-1df561fb4861708ce208488aa307516c0ecfa968.zip
git-1df561fb4861708ce208488aa307516c0ecfa968.tar.gz
git-1df561fb4861708ce208488aa307516c0ecfa968.tar.bz2
Merge branch 'jc/maint-reset-unmerged-path'
* jc/maint-reset-unmerged-path: reset [<commit>] paths...: do not mishandle unmerged paths
Diffstat (limited to 't')
-rwxr-xr-xt/t7102-reset.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/t/t7102-reset.sh b/t/t7102-reset.sh
index f1cfc9a..b096dc8 100755
--- a/t/t7102-reset.sh
+++ b/t/t7102-reset.sh
@@ -429,6 +429,21 @@ test_expect_success '--mixed refreshes the index' '
test_i18ncmp expect output
'
+test_expect_success 'resetting specific path that is unmerged' '
+ git rm --cached file2 &&
+ F1=$(git rev-parse HEAD:file1) &&
+ F2=$(git rev-parse HEAD:file2) &&
+ F3=$(git rev-parse HEAD:secondfile) &&
+ {
+ echo "100644 $F1 1 file2" &&
+ echo "100644 $F2 2 file2" &&
+ echo "100644 $F3 3 file2"
+ } | git update-index --index-info &&
+ git ls-files -u &&
+ test_must_fail git reset HEAD file2 &&
+ git diff-index --exit-code --cached HEAD
+'
+
test_expect_success 'disambiguation (1)' '
git reset --hard &&