Merge branch 'jk/shallow-update-fix'
Serving objects from a shallow repository needs to write a new file to hold the temporary shallow boundaries but it was not cleaned when we exit due to die() or a signal. * 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:
@ -81,7 +81,7 @@ static void create_pack_file(void)
|
||||
const char *argv[12];
|
||||
int i, arg = 0;
|
||||
FILE *pipe_fd;
|
||||
char *shallow_file = NULL;
|
||||
const char *shallow_file = NULL;
|
||||
|
||||
if (shallow_nr) {
|
||||
shallow_file = setup_temporary_shallow(NULL);
|
||||
@ -242,11 +242,6 @@ static void create_pack_file(void)
|
||||
error("git upload-pack: git-pack-objects died with error.");
|
||||
goto fail;
|
||||
}
|
||||
if (shallow_file) {
|
||||
if (*shallow_file)
|
||||
unlink(shallow_file);
|
||||
free(shallow_file);
|
||||
}
|
||||
|
||||
/* flush the data */
|
||||
if (0 <= buffered) {
|
||||
|
Reference in New Issue
Block a user