Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] fetch-pack: do not remove .git/shallow file when --depth is not specified

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:58:30

Nguyễn Thái Ngọc Duy  [off-list ref] writes:
 > The two possible fixes which I see are:
 >
 > 1) Replace back if (alternate_shallow_file) condition in fetch pack with
 >    if (args->depth > 0)
 >
 > 2) alternate_shallow_file should be copy of shallow_lock.filename not a
 >    reference to it

 3) Move alternate_shallow_file to struct fetch_pack_args, which will
    always be zero'd by memset

 I think #1 is better. It's the original condition before 6035d6a
 replaces it with "if (alternate_shallow_file)". Apparently I did not
 see that fetch_pack() could be called twice. #3 is also an option,
 but we still need static "shallow_lock" anyway, so I disregarded it.
Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help