summaryrefslogtreecommitdiff
path: root/sha1_name.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <junkio@cox.net>2006-08-07 17:02:07 -0700
committerLibravatar Junio C Hamano <junkio@cox.net>2006-08-07 17:02:07 -0700
commit9673198ee867cea4ed70d2cf54c1a2eb8f27bb46 (patch)
treef06a5be02102b0a78f56e18beffa8fa5c3e70b6e /sha1_name.c
parentEliminate Scalar::Util usage from private-Error.pm (diff)
parentannotate: Fix bug when parsing merges with differing real and logical parents. (diff)
downloadtgif-9673198ee867cea4ed70d2cf54c1a2eb8f27bb46.tar.xz
Merge branch 'master' into pb/gitpm
This is to resolve the conflicts with Ryan's annotate updates early.
Diffstat (limited to 'sha1_name.c')
-rw-r--r--sha1_name.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sha1_name.c b/sha1_name.c
index c698c1b0b0..bbb9f1b6ec 100644
--- a/sha1_name.c
+++ b/sha1_name.c
@@ -387,13 +387,13 @@ static int peel_onion(const char *name, int len, unsigned char *sha1)
sp++; /* beginning of type name, or closing brace for empty */
if (!strncmp(commit_type, sp, 6) && sp[6] == '}')
- expected_type = TYPE_COMMIT;
+ expected_type = OBJ_COMMIT;
else if (!strncmp(tree_type, sp, 4) && sp[4] == '}')
- expected_type = TYPE_TREE;
+ expected_type = OBJ_TREE;
else if (!strncmp(blob_type, sp, 4) && sp[4] == '}')
- expected_type = TYPE_BLOB;
+ expected_type = OBJ_BLOB;
else if (sp[0] == '}')
- expected_type = TYPE_NONE;
+ expected_type = OBJ_NONE;
else
return -1;
@@ -422,9 +422,9 @@ static int peel_onion(const char *name, int len, unsigned char *sha1)
memcpy(sha1, o->sha1, 20);
return 0;
}
- if (o->type == TYPE_TAG)
+ if (o->type == OBJ_TAG)
o = ((struct tag*) o)->tagged;
- else if (o->type == TYPE_COMMIT)
+ else if (o->type == OBJ_COMMIT)
o = &(((struct commit *) o)->tree->object);
else
return error("%.*s: expected %s type, but the object dereferences to %s type",