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

2013-08-25 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy 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 > >

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

2013-08-25 Thread Nguyễn Thái Ngọc Duy
fetch_pack() can remove .git/shallow file when a shallow repository becomes a full one again. This behavior is triggered incorrectly when tags are also fetched because fetch_pack() will be called twice. At the first fetch_pack() call: - shallow_lock is set up - alternate_shallow_file points to s