X-Git-Url: http://git.tremily.us/?a=blobdiff_plain;f=fetch-pack.c;h=6d8926a5504a6cd93e19860f85d58816bdd5c222;hb=abea4dc76a675d4ac0f27a2367256dc31981d1ca;hp=099ff4ddffecee85d964bfa9f03795ed168edf5f;hpb=6d7c1c88940320c2ccde9d996181826a38ff7a81;p=git.git diff --git a/fetch-pack.c b/fetch-pack.c index 099ff4ddf..6d8926a55 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; @@ -874,8 +877,6 @@ static int fetch_pack_config(const char *var, const char *value, void *cb) return git_default_config(var, value, cb); } -static struct lock_file lock; - static void fetch_pack_setup(void) { static int did_setup; @@ -917,6 +918,7 @@ struct ref *fetch_pack(struct fetch_pack_args *args, ref_cpy = do_fetch_pack(args, fd, ref, sought, pack_lockfile); if (args->depth > 0) { + static struct lock_file lock; struct cache_time mtime; struct strbuf sb = STRBUF_INIT; char *shallow = git_path("shallow");