Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
be2b0a8
compat/posix: introduce utimensat(2) wrapper
vonosmas Aug 21, 2026
2c8ab1a
treewide: use utimensat(2) instead of legacy utime(3p)
vonosmas Aug 21, 2026
ae977d6
compat/posix: drop legacy <utime.h> header and shims
vonosmas Aug 21, 2026
dc78849
Merge branch 'kh/doc-datamodel' into ta/command-list-guides-sync-lint
gitster Sep 10, 2026
31ab709
command-list.txt: add gitformat-loose(5) and gitpacking(7)
taahol Sep 10, 2026
4ce144a
lint-docs: check the guide list in command-list.txt
taahol Sep 10, 2026
25f7f09
merge-ll: use strbuf to read back external merge result
peff Sep 11, 2026
5c86262
merge-ll: catch close() errors when writing external tempfiles
peff Sep 11, 2026
2aaf186
merge-ll: use tempfile API for external driver files
peff Sep 11, 2026
1847b18
Merge branch 'ps/odb-alternates-at-creation' into jch
gitster Sep 17, 2026
ba8defa
Merge branch 'hn/history-squash' into jch
gitster Sep 17, 2026
e0cd7bd
Merge branch 'kn/receive-report-hook' into jch
gitster Sep 17, 2026
10957a1
Merge branch 'jc/cocci-free-updates' into jch
gitster Sep 17, 2026
608bf29
Merge branch 'ak/refs-files-root-ref-lock' into jch
gitster Sep 17, 2026
fdb8395
Merge branch 'ps/ref-storage-format' into jch
gitster Sep 17, 2026
9aba6cb
Merge branch 'dk/use-nsec-runtime' into jch
gitster Sep 17, 2026
89dee53
### match next
gitster Sep 17, 2026
31bbc25
Merge branch 'ij/subtree-reject-v2-config' into jch
gitster Sep 17, 2026
aa65892
Merge branch 'ap/http-preserve-wwwauth-redirect' into jch
gitster Sep 17, 2026
a840457
Merge branch 'as/utimensat-utimes' into jch
gitster Sep 17, 2026
d5b21c5
Merge branch 'vv/branch-recurse-no-start-ref' into jch
gitster Sep 17, 2026
5335aa4
Merge branch 'dw/config-read-both-global' into jch
gitster Sep 17, 2026
61d2fe4
Merge branch 'ta/command-list-guides-sync-lint' into jch
gitster Sep 17, 2026
cf22773
Merge branch 'jk/merge-ll-tempfile-cleanup' into jch
gitster Sep 17, 2026
50e9875
Merge branch 'pp/midx-write-skip-empty' into jch
gitster Sep 17, 2026
9f5e444
Merge branch 'hn/range-diff-matched-only' into jch
gitster Sep 17, 2026
aa7921d
Update main.yml
kaykecrystian261-max Sep 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions refs/files-backend.c
Original file line number Diff line number Diff line change
Expand Up @@ -3034,10 +3034,12 @@ static int files_transaction_prepare(struct ref_store *ref_store,

if (update->flags & REF_DELETING &&
!(update->flags & REF_LOG_ONLY) &&
!(update->flags & REF_IS_PRUNING)) {
!(update->flags & REF_IS_PRUNING) &&
!is_root_ref(update->refname)) {
/*
* This reference has to be deleted from
* packed-refs if it exists there.
* This reference has to be deleted from packed-refs if it
* exists there. Root refs are never packed, so we do not
* have to delete them from packed-refs.
*/
if (!packed_transaction) {
packed_transaction = ref_store_transaction_begin(
Expand Down
40 changes: 40 additions & 0 deletions t/t0600-reffiles-backend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -540,4 +540,44 @@ test_expect_success SYMLINKS,!MINGW,!WITH_BREAKING_CHANGES 'core.preferSymlinkRe
test "$(test_readlink .git/TEST_SYMREF_HEAD)" = refs/heads/new
'

test_expect_success 'deleting a root ref does not lock packed-refs' '
test_when_finished "rm -rf root-ref" &&
git init root-ref &&
(
cd root-ref &&
test_commit initial &&
git update-ref AUTO_MERGE HEAD &&
git pack-refs --all &&
test_path_is_file .git/AUTO_MERGE &&
cp .git/packed-refs expect &&
: >.git/packed-refs.lock &&
git update-ref --no-deref -d AUTO_MERGE &&
test_path_is_missing .git/AUTO_MERGE &&
test_path_is_file .git/packed-refs.lock &&
test_cmp expect .git/packed-refs
)
'

test_expect_success 'deleting root and packed refs in one transaction requires packed-refs lock' '
test_when_finished "rm -rf root-ref" &&
git init root-ref &&
(
cd root-ref &&
test_commit initial &&
git update-ref refs/heads/packed-branch HEAD &&
git pack-refs --all &&
test_path_is_missing .git/refs/heads/packed-branch &&
git update-ref AUTO_MERGE HEAD &&
git refs list --include-root-refs >expect &&
: >.git/packed-refs.lock &&
test_must_fail git update-ref --no-deref --stdin 2>err <<-EOF &&
delete AUTO_MERGE
delete refs/heads/packed-branch
EOF
test_grep "Unable to create .*packed-refs.lock" err &&
git refs list --include-root-refs >actual &&
test_cmp expect actual
)
'

test_done