summaryrefslogtreecommitdiff
path: root/t/t1410-reflog.sh
diff options
context:
space:
mode:
authorLibravatar Nguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-10-21 10:08:59 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-10-22 13:32:54 +0900
commitc9ef0d95ebf3ca154ef1d8345e9713eddecd9c90 (patch)
tree83a6547fd4cb8fb329da0b5a9851dae775ce54b1 /t/t1410-reflog.sh
parentfsck: check HEAD and reflog from other worktrees (diff)
downloadtgif-c9ef0d95ebf3ca154ef1d8345e9713eddecd9c90.tar.xz
reflog expire: cover reflog from all worktrees
Reported-by: Jeff King <peff@peff.net> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1410-reflog.sh')
-rwxr-xr-xt/t1410-reflog.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/t/t1410-reflog.sh b/t/t1410-reflog.sh
index 388b0611d8..3e053532eb 100755
--- a/t/t1410-reflog.sh
+++ b/t/t1410-reflog.sh
@@ -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