From: Junio C Hamano Date: Thu, 25 Aug 2011 23:00:29 +0000 (-0700) Subject: Merge branch 'jn/plug-empty-tree-leak' X-Git-Tag: v1.7.7-rc0~6 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=7abd8fb36d90cc68d471a04b59846d7816609116;p=git.git Merge branch 'jn/plug-empty-tree-leak' * jn/plug-empty-tree-leak: merge-recursive: take advantage of hardcoded empty tree revert: plug memory leak in "cherry-pick root commit" codepath --- 7abd8fb36d90cc68d471a04b59846d7816609116 diff --cc t/t3503-cherry-pick-root.sh index 9aefe3a1b,472e5b80d..e27f39d1e --- a/t/t3503-cherry-pick-root.sh +++ b/t/t3503-cherry-pick-root.sh @@@ -22,31 -29,9 +29,32 @@@ test_expect_success setup test_expect_success 'cherry-pick a root commit' ' + git checkout second^0 && git cherry-pick master && - test first = $(cat file1) + echo first >expect && + test_cmp expect file1 + +' + +test_expect_success 'revert a root commit' ' + + git revert master && + test_path_is_missing file1 + +' + +test_expect_success 'cherry-pick a root commit with an external strategy' ' + + git cherry-pick --strategy=resolve master && + echo first >expect && + test_cmp expect file1 + +' + +test_expect_success 'revert a root commit with an external strategy' ' + + git revert --strategy=resolve master && + test_path_is_missing file1 '