Merge branch 'tr/merge-unborn-clobber'

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

Conflicts:
	t/t7607-merge-overwrite.sh
This commit is contained in:
Junio C Hamano 2011-02-09 16:41:17 -08:00
Родитель 7551391478 5b32708177
Коммит 1a9fe45326
1 изменённых файлов: 16 добавлений и 0 удалений

Просмотреть файл

@ -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