[go: up one dir, main page]

Skip to content

reflog: fix bug which didn't resolve symref reflogs

The commit 297c09ea (refs: allow multiple reflog entries for the same refname, 2024-12-16) added logic to skip the flow for reflogs in lock_ref_for_update() after obtaining the required lock. This was done because it was assumed that the flow ends there for reflogs. However this was incorrect since for a symref's reflog entry, we need to populate the old_oid value which is done right after.

This caused a bug in Git 2.48 where target references of symrefs being updated would create a corrupted reflog entry for the symref since the old_oid is not populated. Undo the skip in logic to fix this issue and also add a test to ensure that such an issue doesn't arise in the future.

Merge request reports

Loading