diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-03-21 12:33:29 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-03-21 12:33:29 -0700 |
commit | 3e14384b126cf9911a35dfda21f04abd4199aa54 (patch) | |
tree | 6970fdb221b531fda063389f03db7b6d0fc7dbfb /upload-pack.c | |
parent | 4291cc10e6b8f720570d612e9d54d5ecd57986c9 (diff) | |
parent | 7839632167bc6ceef20f28bd046f7001493b070f (diff) | |
download | git-3e14384b126cf9911a35dfda21f04abd4199aa54.tar.gz |
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
Diffstat (limited to 'upload-pack.c')
-rw-r--r-- | upload-pack.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/upload-pack.c b/upload-pack.c index 9314c250ff..3a6f9f5b0d 100644 --- a/upload-pack.c +++ b/upload-pack.c @@ -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) { |