diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-11-13 22:37:26 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-11-13 22:37:26 +0900 |
commit | e146cc97be4c054c60d38e9f4edcdc33205bf563 (patch) | |
tree | b36de8c572922ac1c0fda47c028cd7ccd8fd7a35 /t/t1410-reflog.sh | |
parent | Merge branch 'bp/refresh-index-using-preload' (diff) | |
parent | git-worktree.txt: correct linkgit command name (diff) | |
download | tgif-e146cc97be4c054c60d38e9f4edcdc33205bf563.tar.xz |
Merge branch 'nd/per-worktree-ref-iteration'
The code to traverse objects for reachability, used to decide what
objects are unreferenced and expendable, have been taught to also
consider per-worktree refs of other worktrees as starting points to
prevent data loss.
* nd/per-worktree-ref-iteration:
git-worktree.txt: correct linkgit command name
reflog expire: cover reflog from all worktrees
fsck: check HEAD and reflog from other worktrees
fsck: move fsck_head_link() to get_default_heads() to avoid some globals
revision.c: better error reporting on ref from different worktrees
revision.c: correct a parameter name
refs: new ref types to make per-worktree refs visible to all worktrees
Add a place for (not) sharing stuff between worktrees
refs.c: indent with tabs, not spaces
Diffstat (limited to 't/t1410-reflog.sh')
-rwxr-xr-x | t/t1410-reflog.sh | 15 |
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 |