Subject: Re: [PATCH v3 2/2] receive-pack: handle reference deletions separately

From: Junio C Hamano <[email-masked]>
Date: Thu, 12 Jun 2025 13:40:46 -0700

Christian Couder <[email-masked]> writes:

>> when a user pushes multiple branches such as:
>>
>>   delete refs/heads/branch/conflict
>>   create refs/heads/branch
>>
>> Before using batched updates, the references would be applied
>> sequentially and hence no conflicts would arise. With batched updates,
>> while the first update applies, the second fails due to F/D conflict.
>
> Nit: it looks like "D/F conflict" is more often used than "F/D
> conflict" in the Git code base:
>
> $ git grep -i 'd/f conflict' | wc -l
> 119
> $ git grep -i 'f/d conflict' | wc -l
> 7

I do not mind calling a situation F/D conflict if you have a file
and your attempt to create a directory at the same path fails (as
opposed to D/F where directory exists and you cannot overwrite it
with a file), but the above case does sound like a D/F conflict that
deletes directory r/h/b (by removing the last subpath in it), which
is OK, and creates file r/h/b, which the all-or-nothing machinery
does not allow well, so calling D/F may probably be more in line
with the existing practice, regardless of which situation we more
commonly talk about in the code base.