aboutsummaryrefslogtreecommitdiff
path: root/fetch-pack.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-01-26 19:42:09 -0800
committerJunio C Hamano <gitster@pobox.com>2013-01-26 19:42:09 -0800
commit012a1bb524245d119ee561c6c8d269ad021f489a (patch)
treed901026a711a3944ed34b08741fae2a16bfbecc0 /fetch-pack.c
parent5d417842efeafb6e109db7574196901c4e95d273 (diff)
parentb495697b8228fdf7cde426ff99fc5ffe7e43d343 (diff)
downloadgit-012a1bb524245d119ee561c6c8d269ad021f489a.tar.gz
git-012a1bb524245d119ee561c6c8d269ad021f489a.tar.xz
Merge branch 'jk/maint-gc-auto-after-fetch' into jk/gc-auto-after-fetch
* jk/maint-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 099ff4ddf..b4383c6dc 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;