match-trees: use hashcpy to splice trees
[gitweb.git] / t / t1410-reflog.sh
index 388b0611d8e4590f36d9aa44f11d4945a2ae7408..ae8a448e34356034a88fcf0799ef2f53e55f73b8 100755 (executable)
@@ -20,12 +20,12 @@ check_have () {
 }
 
 check_fsck () {
-       output=$(git fsck --full)
+       git fsck --full >fsck.output
        case "$1" in
        '')
-               test -z "$output" ;;
+               test_must_be_empty fsck.output ;;
        *)
-               echo "$output" | grep "$1" ;;
+               test_i18ngrep "$1" fsck.output ;;
        esac
 }
 
@@ -368,4 +368,19 @@ test_expect_success 'continue walking past root commits' '
        )
 '
 
+test_expect_success 'expire with multiple worktrees' '
+       git init main-wt &&
+       (
+               cd main-wt &&
+               test_tick &&
+               test_commit foo &&
+               git  worktree add link-wt &&
+               test_tick &&
+               test_commit -C link-wt foobar &&
+               test_tick &&
+               git reflog expire --verbose --all --expire=$test_tick &&
+               test_must_be_empty .git/worktrees/link-wt/logs/HEAD
+       )
+'
+
 test_done