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
This commit is contained in:
Junio C Hamano
2014-04-03 13:39:03 -07:00
5 changed files with 49 additions and 56 deletions

View File

@ -948,17 +948,6 @@ static void update_shallow(struct fetch_pack_args *args,
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