From: Junio C Hamano Date: Thu, 27 Jan 2011 18:27:49 +0000 (-0800) Subject: Merge branch 'maint' X-Git-Tag: ko-master~2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=99e63ef24e18c8ca918922b052de96a8ceca48a4;p=git.git Merge branch 'maint' * maint: rebase -i: clarify in-editor documentation of "exec" tests: sanitize more git environment variables fast-import: treat filemodify with empty tree as delete rebase: give a better error message for bogus branch rebase: use explicit "--" with checkout Conflicts: t/t9300-fast-import.sh --- 99e63ef24e18c8ca918922b052de96a8ceca48a4 diff --cc t/t9300-fast-import.sh index 222d1059e,385e78c22..986bc14d5 --- a/t/t9300-fast-import.sh +++ b/t/t9300-fast-import.sh @@@ -898,27 -874,48 +898,69 @@@ test_expect_success git diff-tree -C --find-copies-harder -r N4^ N4 >actual && compare_diff_raw expect actual' +test_expect_success \ + 'N: copy root directory by tree hash' \ + 'cat >expect <<-\EOF && + :100755 000000 f1fb5da718392694d0076d677d6d0e364c79b0bc 0000000000000000000000000000000000000000 D file3/newf + :100644 000000 7123f7f44e39be127c5eb701e5968176ee9d78b1 0000000000000000000000000000000000000000 D file3/oldf + EOF + root=$(git rev-parse refs/heads/branch^0^{tree}) && + cat >input <<-INPUT_END && + commit refs/heads/N6 + committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE + data <actual && + compare_diff_raw expect actual' + + test_expect_success \ + 'N: delete directory by copying' \ + 'cat >expect <<-\EOF && + OBJID + :100644 000000 OBJID OBJID D foo/bar/qux + OBJID + :000000 100644 OBJID OBJID A foo/bar/baz + :000000 100644 OBJID OBJID A foo/bar/qux + EOF + empty_tree=$(git mktree input <<-INPUT_END && + commit refs/heads/N-delete + committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE + data < $GIT_COMMITTER_DATE + data <actual && + test_cmp expect actual' + test_expect_success \ 'N: modify copied tree' \ 'cat >expect <<-\EOF &&