Stefan Beller writes:
> On Fri, Jan 23, 2015 at 4:39 PM, Junio C Hamano wrote:
>> Stefan Beller writes:
>>
>>> On Fri, Jan 23, 2015 at 3:57 PM, Junio C Hamano wrote:
Stefan Beller writes:
> -static int commit_ref(struct ref_lock *lock)
> +static int commit_ref(struct ref_loc
On Fri, Jan 23, 2015 at 4:39 PM, Junio C Hamano wrote:
> Stefan Beller writes:
>
>> On Fri, Jan 23, 2015 at 3:57 PM, Junio C Hamano wrote:
>>> Stefan Beller writes:
>>>
-static int commit_ref(struct ref_lock *lock)
+static int commit_ref(struct ref_lock *lock, const unsigned char *sha
Stefan Beller writes:
> On Fri, Jan 23, 2015 at 3:57 PM, Junio C Hamano wrote:
>> Stefan Beller writes:
>>
>>> -static int commit_ref(struct ref_lock *lock)
>>> +static int commit_ref(struct ref_lock *lock, const unsigned char *sha1)
>>> {
>>> + if (!lock->force_write && !hashcmp(lock->old
On Fri, Jan 23, 2015 at 3:57 PM, Junio C Hamano wrote:
> Stefan Beller writes:
>
>> -static int commit_ref(struct ref_lock *lock)
>> +static int commit_ref(struct ref_lock *lock, const unsigned char *sha1)
>> {
>> + if (!lock->force_write && !hashcmp(lock->old_sha1, sha1))
>> + r
Stefan Beller writes:
> -static int commit_ref(struct ref_lock *lock)
> +static int commit_ref(struct ref_lock *lock, const unsigned char *sha1)
> {
> + if (!lock->force_write && !hashcmp(lock->old_sha1, sha1))
> + return 0;
> if (commit_lock_file(lock->lk))
>
This makes write_ref_sha1 only write the the lock file, committing
needs to be done outside of that function. This will help us change
the ref_transaction_commit in a later patch.
Also instead of calling unlock_ref before each return in write_ref_sha1
we can call this after the call. This is a fir
6 matches
Mail list logo