summaryrefslogtreecommitdiff
path: root/fetch-pack.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-02-01 12:40:16 -0800
committerJunio C Hamano <gitster@pobox.com>2013-02-01 12:40:16 -0800
commit4acfff9dda29ae700c8b053cf7af9d4bcdf73762 (patch)
treee3af4cc1640f1594c5cda9e3bbb9718952e0a3b7 /fetch-pack.c
parent97fbc23ad7bf13e4f4b74c6f9f98aaa65bd2117a (diff)
parent012a1bb524245d119ee561c6c8d269ad021f489a (diff)
downloadgit-4acfff9dda29ae700c8b053cf7af9d4bcdf73762.tar.gz
Merge branch 'jk/gc-auto-after-fetch'
Help "fetch only" repositories that do not trigger "gc --auto" often enough. * jk/gc-auto-after-fetch: fetch-pack: avoid repeatedly re-scanning pack directory fetch: run gc --auto after fetching
Diffstat (limited to 'fetch-pack.c')
-rw-r--r--fetch-pack.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fetch-pack.c b/fetch-pack.c
index f0acdf7331..6d8926a550 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -594,6 +594,9 @@ static int everything_local(struct fetch_pack_args *args,
for (ref = *refs; ref; ref = ref->next) {
struct object *o;
+ if (!has_sha1_file(ref->old_sha1))
+ continue;
+
o = parse_object(ref->old_sha1);
if (!o)
continue;