From: Junio C Hamano Date: Tue, 5 Mar 2024 17:44:44 +0000 (-0800) Subject: Merge branch 'kn/for-all-refs' X-Git-Tag: v2.45.0-rc0~137 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d037212d973351ced4a3f0bb0705575bee4f8566;p=thirdparty%2Fgit.git Merge branch 'kn/for-all-refs' "git for-each-ref" learned "--include-root-refs" option to show even the stuff outside the 'refs/' hierarchy. * kn/for-all-refs: for-each-ref: add new option to include root refs ref-filter: rename 'FILTER_REFS_ALL' to 'FILTER_REFS_REGULAR' refs: introduce `refs_for_each_include_root_refs()` refs: extract out `loose_fill_ref_dir_regular_file()` refs: introduce `is_pseudoref()` and `is_headref()` --- d037212d973351ced4a3f0bb0705575bee4f8566 diff --cc t/t0600-reffiles-backend.sh index 09e71b2b0f,e6a5f1868f..64214340e7 --- a/t/t0600-reffiles-backend.sh +++ b/t/t0600-reffiles-backend.sh @@@ -279,31 -279,31 +279,31 @@@ test_expect_success 'setup worktree' # direct FS access for creating the reflogs. 3) PSEUDO-WT and refs/bisect/random # do not create reflogs by default, so it is not testing a realistic scenario. test_expect_success 'for_each_reflog()' ' -- echo $ZERO_OID > .git/logs/PSEUDO-MAIN && ++ echo $ZERO_OID >.git/logs/PSEUDO_MAIN_HEAD && mkdir -p .git/logs/refs/bisect && -- echo $ZERO_OID > .git/logs/refs/bisect/random && ++ echo $ZERO_OID >.git/logs/refs/bisect/random && -- echo $ZERO_OID > .git/worktrees/wt/logs/PSEUDO-WT && ++ echo $ZERO_OID >.git/worktrees/wt/logs/PSEUDO_WT_HEAD && mkdir -p .git/worktrees/wt/logs/refs/bisect && -- echo $ZERO_OID > .git/worktrees/wt/logs/refs/bisect/wt-random && ++ echo $ZERO_OID >.git/worktrees/wt/logs/refs/bisect/wt-random && - $RWT for-each-reflog | cut -d" " -f 2- | sort >actual && + $RWT for-each-reflog >actual && cat >expected <<-\EOF && - HEAD 0x1 - PSEUDO-WT 0x0 - refs/bisect/wt-random 0x0 - refs/heads/main 0x0 - refs/heads/wt-main 0x0 + HEAD - PSEUDO-WT ++ PSEUDO_WT_HEAD + refs/bisect/wt-random + refs/heads/main + refs/heads/wt-main EOF test_cmp expected actual && - $RMAIN for-each-reflog | cut -d" " -f 2- | sort >actual && + $RMAIN for-each-reflog >actual && cat >expected <<-\EOF && - HEAD 0x1 - PSEUDO-MAIN 0x0 - refs/bisect/random 0x0 - refs/heads/main 0x0 - refs/heads/wt-main 0x0 + HEAD - PSEUDO-MAIN ++ PSEUDO_MAIN_HEAD + refs/bisect/random + refs/heads/main + refs/heads/wt-main EOF test_cmp expected actual '