diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-03-25 14:01:02 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-03-25 14:01:03 -0700 |
commit | 62bd0c01057b1cc47f4710090da4c84511f3cc3d (patch) | |
tree | a188a091111f84b0550d9340abbd2cc6e540fe97 /upload-pack.c | |
parent | 51ebd0fe9e089df08eeb5b1547f0585c2de13683 (diff) | |
parent | f59de5d1ff9b0f9d570df99128f41520a281f9a5 (diff) | |
download | git-62bd0c01057b1cc47f4710090da4c84511f3cc3d.tar.gz |
Merge branch 'jk/peel-ref'
Recent optimization broke shallow clones.
* jk/peel-ref:
upload-pack: load non-tip "want" objects from disk
upload-pack: make sure "want" objects are parsed
upload-pack: drop lookup-before-parse optimization
Diffstat (limited to 'upload-pack.c')
-rw-r--r-- | upload-pack.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/upload-pack.c b/upload-pack.c index 35605310d2..f5673ee4c2 100644 --- a/upload-pack.c +++ b/upload-pack.c @@ -327,9 +327,7 @@ static int got_sha1(char *hex, unsigned char *sha1) if (!has_sha1_file(sha1)) return -1; - o = lookup_object(sha1); - if (!(o && o->parsed)) - o = parse_object(sha1); + o = parse_object(sha1); if (!o) die("oops (%s)", sha1_to_hex(sha1)); if (o->type == OBJ_COMMIT) { @@ -648,7 +646,7 @@ static void receive_needs(void) if (parse_feature_request(features, "include-tag")) use_include_tag = 1; - o = lookup_object(sha1_buf); + o = parse_object(sha1_buf); if (!o) die("git upload-pack: not our ref %s", sha1_to_hex(sha1_buf)); |