submodule: migrate get_next_submodule to use repository structs
[gitweb.git] / t / t1410-reflog.sh
index 8293131001ee0e816406df858dc47bc2fb9be3ce..3e053532eb8df817e216532c807eba0ba549e8c3 100755 (executable)
@@ -290,9 +290,8 @@ test_expect_success 'stale dirs do not cause d/f conflicts (reflogs off)' '
        # same as before, but we only create a reflog for "one" if
        # it already exists, which it does not
        git -c core.logallrefupdates=false branch one master &&
-       : >expect &&
        git log -g --format="%gd %gs" one >actual &&
-       test_cmp expect actual
+       test_must_be_empty actual
 '
 
 # Triggering the bug detected by this test requires a newline to fall
@@ -369,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