From: Junio C Hamano Date: Thu, 3 Apr 2014 20:39:03 +0000 (-0700) Subject: Merge branch 'jk/shallow-update-fix' into maint X-Git-Tag: v1.9.2~17 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/9c7d0cc62f10d4945e665614ca836a4a5c81593c?ds=inline;hp=-c Merge branch 'jk/shallow-update-fix' into maint * jk/shallow-update-fix: shallow: verify shallow file after taking lock shallow: automatically clean up shallow tempfiles shallow: use stat_validity to check for up-to-date file --- 9c7d0cc62f10d4945e665614ca836a4a5c81593c diff --combined fetch-pack.c index f061f1fe85,ae8550eb48..90d47da8a9 --- a/fetch-pack.c +++ b/fetch-pack.c @@@ -439,8 -439,7 +439,8 @@@ done } strbuf_release(&req_buf); - consume_shallow_list(args, fd[0]); + if (!got_ready || !no_done) + consume_shallow_list(args, fd[0]); while (flushes || multi_ack) { int ack = get_ack(fd[0], result_sha1); if (ack) { @@@ -948,17 -947,6 +948,6 @@@ static void update_shallow(struct fetch if (!si->shallow || !si->shallow->nr) return; - if (alternate_shallow_file) { - /* - * The temporary shallow file is only useful for - * index-pack and unpack-objects because it may - * contain more roots than we want. Delete it. - */ - if (*alternate_shallow_file) - unlink(alternate_shallow_file); - free((char *)alternate_shallow_file); - } - if (args->cloning) { /* * remote is shallow, but this is a clone, there are