diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-04-10 16:28:23 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-04-10 16:28:23 +0900 |
commit | 9aa3a4c406e1db08269cc8f6e8757555bd771120 (patch) | |
tree | 21d4d27b791a09d5f2e5dc635b490adc31bbc6b0 /t | |
parent | Merge branch 'nd/trace-with-env' (diff) | |
parent | filter-branch: fix errors caused by refs that point at non-committish (diff) | |
download | tgif-9aa3a4c406e1db08269cc8f6e8757555bd771120.tar.xz |
Merge branch 'yk/filter-branch-non-committish-refs'
when refs that do not point at committish are given, "git
filter-branch" gave a misleading error messages. This has been
corrected.
* yk/filter-branch-non-committish-refs:
filter-branch: fix errors caused by refs that point at non-committish
Diffstat (limited to 't')
-rwxr-xr-x | t/t7003-filter-branch.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/t/t7003-filter-branch.sh b/t/t7003-filter-branch.sh index 7cb60799be..04f79f32b4 100755 --- a/t/t7003-filter-branch.sh +++ b/t/t7003-filter-branch.sh @@ -470,4 +470,18 @@ test_expect_success 'tree-filter deals with object name vs pathname ambiguity' ' git show HEAD:$ambiguous ' +test_expect_success 'rewrite repository including refs that point at non-commit object' ' + test_when_finished "git reset --hard original" && + tree=$(git rev-parse HEAD^{tree}) && + test_when_finished "git replace -d $tree" && + echo A >new && + git add new && + new_tree=$(git write-tree) && + git replace $tree $new_tree && + git tag -a -m "tag to a tree" treetag $new_tree && + git reset --hard HEAD && + git filter-branch -f -- --all >filter-output 2>&1 && + ! fgrep fatal filter-output +' + test_done |