Browse Source

Merge branch 'tr/merge-unborn-clobber'

* tr/merge-unborn-clobber:
  Exhibit merge bug that clobbers index&WT

Conflicts:
	t/t7607-merge-overwrite.sh
maint
Junio C Hamano 14 years ago
parent
commit
1a9fe45326
  1. 16
      t/t7607-merge-overwrite.sh

16
t/t7607-merge-overwrite.sh

@ -156,4 +156,20 @@ test_expect_success 'will not overwrite untracked file on unborn branch' ' @@ -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

Loading…
Cancel
Save