diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2007-10-19 00:54:59 -0400 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2007-10-19 03:47:07 -0400 |
commit | cfa5b2b7faa1a620ec6599a63fa5b9b45bd62b57 (patch) | |
tree | c0b728d7ec2e7108a609919deb7f97436cafc4f8 | |
parent | da0204df587ae76cd291bc7e495fc60d873c2f20 (diff) | |
download | git-cfa5b2b7faa1a620ec6599a63fa5b9b45bd62b57.tar.gz git-cfa5b2b7faa1a620ec6599a63fa5b9b45bd62b57.tar.xz |
Avoid scary errors about tagged trees/blobs during git-fetch
This is the same bug as 42a32174b600f139b489341b1281fb1bfa14c252.
The warning "Object $X is a tree, not a commit" is bogus and is
not relevant here. If its not a commit we just need to make sure
we don't mark it for merge as we fill out FETCH_HEAD.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
-rw-r--r-- | builtin-fetch.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin-fetch.c b/builtin-fetch.c index 3442f3d09..b9d2b0c27 100644 --- a/builtin-fetch.c +++ b/builtin-fetch.c @@ -202,8 +202,8 @@ static int update_local_ref(struct ref *ref, return s_update_ref("updating tag", ref, 0); } - current = lookup_commit_reference(ref->old_sha1); - updated = lookup_commit_reference(ref->new_sha1); + current = lookup_commit_reference_gently(ref->old_sha1, 1); + updated = lookup_commit_reference_gently(ref->new_sha1, 1); if (!current || !updated) { char *msg; if (!strncmp(ref->name, "refs/tags/", 10)) @@ -261,7 +261,7 @@ static void store_updated_refs(const char *url, struct ref *ref_map) ref->force = rm->peer_ref->force; } - commit = lookup_commit_reference(rm->old_sha1); + commit = lookup_commit_reference_gently(rm->old_sha1, 1); if (!commit) rm->merge = 0; |