summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-08-16 18:41:28 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-08-16 18:41:28 (GMT)
commit7aa50897dda0360b9cbbe23e723a5aee461e1d71 (patch)
treefaa92da7147f6ffee7057a9e3afeaa2a6fca398c /t
parentb5e104a0e69f224b89a849fa1e9b4064a36c2f4b (diff)
parentff00b682f203eb39876b57404916b4c54b6032c6 (diff)
downloadgit-7aa50897dda0360b9cbbe23e723a5aee461e1d71.zip
git-7aa50897dda0360b9cbbe23e723a5aee461e1d71.tar.gz
git-7aa50897dda0360b9cbbe23e723a5aee461e1d71.tar.bz2
Merge branch 'jc/maint-reset-unmerged-path' into maint
* 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 &&