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:

>> What I am trying to get at is if it would be safer to have a pair of
>> thin wrapper for rolling back or committing a new version of new
>> shallow file, e.g. rollback_shallow_file() + commit_shallow_file(),
>> and replace calls to {rollback,commit}_lock_file() with calls to
>> them.
>
> Very elegant. Thanks for an excellent suggestion. v2 incoming just as
> soon as 'make test' finishes...

Note that I didn't verify there is a case where we want not to call
reset_repository_shallow() after committing or rolling back, either
for performance or correctness purposes.  As long as the experts on
the codepaths involved are happy with the idea, I'd be happy, too.

JNieder raised the idea of using a different type to avoid calling
the bare rollback/commit functions by mistake.  It appears that, in
addition to these two functions, setup_alternate_shallow() needs to
be updated if we wanted to go that route, and it sounds like a good
idea to gain safety with minimal cost.

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