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

@ -828,14 +828,10 @@ static void execute_commands(struct command *commands,
}
}
if (shallow_update) {
if (!checked_connectivity)
error("BUG: run 'git fsck' for safety.\n"
"If there are errors, try to remove "
"the reported refs above");
if (alt_shallow_file && *alt_shallow_file)
unlink(alt_shallow_file);
}
if (shallow_update && !checked_connectivity)
error("BUG: run 'git fsck' for safety.\n"
"If there are errors, try to remove "
"the reported refs above");
}
static struct command *read_head_info(struct sha1_array *shallow)
@ -1087,10 +1083,6 @@ static void update_shallow_info(struct command *commands,
cmd->skip_update = 1;
}
}
if (alt_shallow_file && *alt_shallow_file) {
unlink(alt_shallow_file);
alt_shallow_file = NULL;
}
free(ref_status);
}