Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--refs.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/refs.c b/refs.c
index f672ad93a6..02e47b1157 100644
--- a/refs.c
+++ b/refs.c
@@ -1225,8 +1225,15 @@ int peel_ref(const char *refname, unsigned char *sha1)
}
fallback:
- o = parse_object(base);
- if (o && o->type == OBJ_TAG) {
+ o = lookup_unknown_object(base);
+ if (o->type == OBJ_NONE) {
+ int type = sha1_object_info(base, NULL);
+ if (type < 0)
+ return -1;
+ o->type = type;
+ }
+
+ if (o->type == OBJ_TAG) {
o = deref_tag_noverify(o);
if (o) {
hashcpy(sha1, o->sha1);