diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-03-14 22:25:02 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-03-14 22:25:03 +0100 |
commit | 6eb593a764303c05c7ca4f0fd107c5118b9cf7fb (patch) | |
tree | 8264b088a2d90ebb77adaf6afce0f99fed8f7845 /t/t7102-reset.sh | |
parent | Merge branch 'lb/contrib-contacts-looser-diff-parsing' (diff) | |
parent | reset: optionally setup worktree and refresh index on --mixed (diff) | |
download | git-6eb593a764303c05c7ca4f0fd107c5118b9cf7fb.tar.xz git-6eb593a764303c05c7ca4f0fd107c5118b9cf7fb.zip |
Merge branch 'nd/reset-setup-worktree'
"git reset" needs to refresh the index when working in a working
tree (it can also be used to match the index to the HEAD in an
otherwise bare repository), but it failed to set up the working
tree properly, causing GIT_WORK_TREE to be ignored.
* nd/reset-setup-worktree:
reset: optionally setup worktree and refresh index on --mixed
Diffstat (limited to 't/t7102-reset.sh')
-rwxr-xr-x | t/t7102-reset.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t7102-reset.sh b/t/t7102-reset.sh index bc0846f435..450529404c 100755 --- a/t/t7102-reset.sh +++ b/t/t7102-reset.sh @@ -550,4 +550,15 @@ test_expect_success 'reset -N keeps removed files as intent-to-add' ' test_cmp expect actual ' +test_expect_success 'reset --mixed sets up work tree' ' + git init mixed_worktree && + ( + cd mixed_worktree && + test_commit dummy + ) && + : >expect && + git --git-dir=mixed_worktree/.git --work-tree=mixed_worktree reset >actual && + test_cmp expect actual +' + test_done |