aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-03-21 12:33:29 -0700
committerJunio C Hamano <gitster@pobox.com>2014-03-21 12:33:29 -0700
commit3e14384b126cf9911a35dfda21f04abd4199aa54 (patch)
tree6970fdb221b531fda063389f03db7b6d0fc7dbfb /builtin
parent4291cc10e6b8f720570d612e9d54d5ecd57986c9 (diff)
parent7839632167bc6ceef20f28bd046f7001493b070f (diff)
downloadgit-3e14384b126cf9911a35dfda21f04abd4199aa54.tar.gz
git-3e14384b126cf9911a35dfda21f04abd4199aa54.tar.xz
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 'builtin')
-rw-r--r--builtin/receive-pack.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index 85bba356f..c3230817d 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -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);
}