diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-07-02 21:32:11 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-07-10 03:42:22 +0400 |
commit | 33bd598c3902c40c5a10a68aeaa3004484239258 (patch) | |
tree | 22343053edd965f69d872b3f221e022a593fef4b /builtin/cat-file.c | |
parent | e2643617d75e53e5a69278f8d7382553d1c14cf0 (diff) |
sha1_name.c: teach lookup context to get_sha1_with_context()
The function takes user input string and returns the object name
(binary SHA-1) with mode bits and path when the object was looked
up in a tree.
Additionally give hints to help disambiguation of abbreviated object
names when the caller knows what it is looking for.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/cat-file.c')
-rw-r--r-- | builtin/cat-file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/cat-file.c b/builtin/cat-file.c index 07bd984084..c27268ff30 100644 --- a/builtin/cat-file.c +++ b/builtin/cat-file.c @@ -90,7 +90,7 @@ static int cat_one_file(int opt, const char *exp_type, const char *obj_name) unsigned long size; struct object_context obj_context; - if (get_sha1_with_context(obj_name, sha1, &obj_context)) + if (get_sha1_with_context(obj_name, 0, sha1, &obj_context)) die("Not a valid object name %s", obj_name); buf = NULL; |