diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-02-10 01:41:17 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-02-10 01:41:17 +0100 |
commit | 1a9fe453263137be7d42e6fbfc041b5b2d9521d7 (patch) | |
tree | 5d55b038cada0490cbf7aa69da76c7b6255de58e /t | |
parent | Merge branch 'jc/unpack-trees' (diff) | |
parent | Exhibit merge bug that clobbers index&WT (diff) | |
download | git-1a9fe453263137be7d42e6fbfc041b5b2d9521d7.tar.xz git-1a9fe453263137be7d42e6fbfc041b5b2d9521d7.zip |
Merge branch 'tr/merge-unborn-clobber'
* tr/merge-unborn-clobber:
Exhibit merge bug that clobbers index&WT
Conflicts:
t/t7607-merge-overwrite.sh
Diffstat (limited to 't')
-rwxr-xr-x | t/t7607-merge-overwrite.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/t/t7607-merge-overwrite.sh b/t/t7607-merge-overwrite.sh index 4d5ce4e682..5f731a1177 100755 --- a/t/t7607-merge-overwrite.sh +++ b/t/t7607-merge-overwrite.sh @@ -156,4 +156,20 @@ test_expect_success 'will not overwrite untracked file on unborn branch' ' test_cmp important c0.c ' +test_expect_success 'set up unborn branch and content' ' + git symbolic-ref HEAD refs/heads/unborn && + rm -f .git/index && + echo foo > tracked-file && + git add tracked-file && + echo bar > untracked-file +' + +test_expect_failure 'will not clobber WT/index when merging into unborn' ' + git merge master && + grep foo tracked-file && + git show :tracked-file >expect && + grep foo expect && + grep bar untracked-file +' + test_done |