Re: [PATCH] shallow.c: use 'reset_repository_shallow' when appropriate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Taylor Blau <me@xxxxxxxxxxxx> writes:

>> > @@ -414,6 +414,7 @@ void prune_shallow(unsigned options)
>> >  	} else {
>> >  		unlink(git_path_shallow(the_repository));
>> >  		rollback_lock_file(&shallow_lock);
>> > +		reset_repository_shallow(the_repository);
>> >  	}
>>
>> Here, we reset only after we realize we cannot write the updated
>> shallow file.  Intended?
>
> Yes, see this earlier discussion I had about it with Jonathan:
> https://lore.kernel.org/git/20200416020509.225014-1-jonathantanmy@xxxxxxxxxx/.

I did, and then I asked the question, because I couldn't quite get
if JTan was asking a question similar to the one he asked earlier in
the message ("do you need a reset in the "else" branch as well?"),
or if he was saying what he sees there, "the opposite case", was
good.

Also, I was sort-of reacting to """In any case, I think the commit
message should discuss why reset_repository_shallow() is added only
on the unlink+rollback side in one "if" statement, but only on the
opposite "commit" side in another "if" statement.""" in that
message.

Thanks.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux