Merge branch 'kn/reflog-symref-fix'
reflog entries for symbolic ref updates were broken, which has been corrected. * kn/reflog-symref-fix: refs: fix creation of reflog entries for symrefs
This commit is contained in:
@ -2615,9 +2615,6 @@ static int lock_ref_for_update(struct files_ref_store *refs,
|
||||
|
||||
update->backend_data = lock;
|
||||
|
||||
if (update->flags & REF_LOG_ONLY)
|
||||
goto out;
|
||||
|
||||
if (update->type & REF_ISSYMREF) {
|
||||
if (update->flags & REF_NO_DEREF) {
|
||||
/*
|
||||
|
@ -2068,4 +2068,13 @@ do
|
||||
|
||||
done
|
||||
|
||||
test_expect_success 'update-ref should also create reflog for HEAD' '
|
||||
test_commit to-rewind &&
|
||||
git rev-parse HEAD >expect &&
|
||||
head=$(git symbolic-ref HEAD) &&
|
||||
git update-ref --create-reflog "$head" HEAD~ &&
|
||||
git rev-parse HEAD@{1} >actual &&
|
||||
test_cmp expect actual
|
||||
'
|
||||
|
||||
test_done
|
||||
|
Reference in New Issue
Block a user