diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-04-03 13:39:03 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-04-03 13:39:03 -0700 |
commit | 9c7d0cc62f10d4945e665614ca836a4a5c81593c (patch) | |
tree | 4d8a734760cb775bfd92414cad9fb2b179591142 /builtin | |
parent | 6248be7678ad2c262a460c052ef4f28744e75cc4 (diff) | |
parent | 7839632167bc6ceef20f28bd046f7001493b070f (diff) | |
download | git-9c7d0cc62f10d4945e665614ca836a4a5c81593c.tar.gz |
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
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/receive-pack.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c index 85bba356fa..c3230817db 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); } |