summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
Diffstat (limited to 'builtin')
-rw-r--r--builtin/fetch-pack.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/builtin/fetch-pack.c b/builtin/fetch-pack.c
index fdda36f149..827765dc1d 100644
--- a/builtin/fetch-pack.c
+++ b/builtin/fetch-pack.c
@@ -610,6 +610,9 @@ static int everything_local(struct ref **refs, int nr_match, char **match)
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;