aboutsummaryrefslogtreecommitdiff
path: root/t/t7003-filter-branch.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-04-07 14:29:34 -0700
committerJunio C Hamano <gitster@pobox.com>2013-04-07 14:29:34 -0700
commit9a11f13d9e5cfa1db0a3f42bc9ee886ffa7a5a22 (patch)
treeac51bad5d24c60057ed97d39db6db8a597c41fcb /t/t7003-filter-branch.sh
parent9e7673ed7ff656738fdc02d1c529d363aaa98002 (diff)
parent97276019bb20829c97528b53dc453a37177c35bb (diff)
downloadgit-9a11f13d9e5cfa1db0a3f42bc9ee886ffa7a5a22.tar.gz
git-9a11f13d9e5cfa1db0a3f42bc9ee886ffa7a5a22.tar.xz
Merge branch 'jk/filter-branch-come-back-to-original'
When used with "-d temporary-directory" option, "git filter-branch" failed to come back to the original working tree to perform the final clean-up procedure. * jk/filter-branch-come-back-to-original: filter-branch: return to original dir after filtering
Diffstat (limited to 't/t7003-filter-branch.sh')
-rwxr-xr-xt/t7003-filter-branch.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/t/t7003-filter-branch.sh b/t/t7003-filter-branch.sh
index 1e7a209ef..9496736a8 100755
--- a/t/t7003-filter-branch.sh
+++ b/t/t7003-filter-branch.sh
@@ -64,6 +64,20 @@ test_expect_success 'correct GIT_DIR while using -d' '
grep drepo "$TRASHDIR/backup-refs"
'
+test_expect_success 'tree-filter works with -d' '
+ git init drepo-tree &&
+ (
+ cd drepo-tree &&
+ test_commit one &&
+ git filter-branch -d "$TRASHDIR/dfoo" \
+ --tree-filter "echo changed >one.t" &&
+ echo changed >expect &&
+ git cat-file blob HEAD:one.t >actual &&
+ test_cmp expect actual &&
+ test_cmp one.t actual
+ )
+'
+
test_expect_success 'Fail if commit filter fails' '
test_must_fail git filter-branch -f --commit-filter "exit 1" HEAD
'