Skip to content

Commit

Permalink
Merge branch 'tr/merge-unborn-clobber'
Browse files Browse the repository at this point in the history
* tr/merge-unborn-clobber:
  Exhibit merge bug that clobbers index&WT

Conflicts:
	t/t7607-merge-overwrite.sh
  • Loading branch information
Junio C Hamano committed Feb 10, 2011
2 parents 7551391 + 5b32708 commit 1a9fe45
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions t/t7607-merge-overwrite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 1a9fe45

Please sign in to comment.