Thread (2 messages) 2 messages, 2 authors, 2020-04-24

Re: [PATCH v2 2/2] shallow.c: use '{commit,rollback}_shallow_file'

From: Taylor Blau <hidden>
Date: 2020-04-24 17:13:04

On Thu, Apr 23, 2020 at 01:40:47PM -0700, Junio C Hamano wrote:
Jonathan Tan [off-list ref] writes:
quoted
quoted
Replace each instance of 'commit_lock_file' and 'rollback_lock_file'
with 'commit_shallow_file' and 'rollback_shallow_file' when the lock
being held is over the '.git/shallow' file.
I think Jonathan Nieder already covered 1/2 so I'll just close the loop
on this patch. There was one potential issue in that a previous version
of this patch also called reset_repository_shallow() in
setup_alternate_shallow(), but this version does not. But after looking
into it, this looks fine - setup_alternate_shallow() deals with a
passed-in alternate_shallow_file variable, which is different from the
r->parsed_objects->alternate_shallow_file that is_repository_shallow()
uses to set the global variables. (I might have confused the two during
earlier reviews.) Also, setup_alternate_shallow() is called either
before any shallow processing (empirically demonstrating that no
resetting is needed in this case, because it has been working), or right
before a commit or rollback of the lock file (so the global variables
are being reset anyway, so we do not need to call
reset_repository_shallow()).

So,
Reviewed-by: Jonathan Tan <redacted>
Thanks for a review.

And of course, thanks Taylor.  Will queue.
Thanks, both. I'll send some more patches on top to introduce a
'shallow_lock' type.

Thanks,
Taylor
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help