X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft7003-filter-branch.sh;h=329c851685b1c663ee88d45a5d21d452a293fa8e;hb=f474c526618d5d1111b585a6344e012fb731d3fe;hp=56b5eccdb4a0563b4df22e2af679b08b66ef6ae1;hpb=30aa4fb15fa408596dea59cdc9f00c94eeaa69f1;p=git.git diff --git a/t/t7003-filter-branch.sh b/t/t7003-filter-branch.sh index 56b5eccdb..329c85168 100755 --- a/t/t7003-filter-branch.sh +++ b/t/t7003-filter-branch.sh @@ -48,6 +48,18 @@ test_expect_success 'result is really identical' ' test $H = $(git rev-parse HEAD) ' +TRASHDIR=$(pwd) +test_expect_success 'correct GIT_DIR while using -d' ' + mkdir drepo && + ( cd drepo && + git init && + test_commit drepo && + git filter-branch -d "$TRASHDIR/dfoo" \ + --index-filter "cp \"$TRASHDIR\"/dfoo/backup-refs \"$TRASHDIR\"" \ + ) && + grep drepo "$TRASHDIR/backup-refs" +' + test_expect_success 'Fail if commit filter fails' ' test_must_fail git filter-branch -f --commit-filter "exit 1" HEAD '