diff options
author | Junio C Hamano <junkio@cox.net> | 2006-07-14 15:39:19 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-07-14 15:39:19 -0700 |
commit | 5cd060b56c3d0b9f2340377d73dfe1abbcbe8a20 (patch) | |
tree | fc993f674db014236b94f3c6e147b1ac5b838699 /sha1_name.c | |
parent | 1733832d8ec11655924af58efb67ff4503928b59 (diff) | |
parent | e5a78b1ca8b62aee8567d67f0e0db5ac7706806a (diff) | |
download | git-5cd060b56c3d0b9f2340377d73dfe1abbcbe8a20.tar.gz |
Merge branch 'lt/unitype'
* lt/unitype:
builtin-prune.c: forgot TYPE => OBJ changes.
Remove TYPE_* constant macros and use object_type enums consistently.
Diffstat (limited to 'sha1_name.c')
-rw-r--r-- | sha1_name.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sha1_name.c b/sha1_name.c index f2cbafa496..5fe8e5d4bf 100644 --- a/sha1_name.c +++ b/sha1_name.c @@ -381,13 +381,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; @@ -416,9 +416,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", |