summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-07-02 17:32:11 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-07-09 23:42:22 (GMT)
commit33bd598c3902c40c5a10a68aeaa3004484239258 (patch)
tree22343053edd965f69d872b3f221e022a593fef4b /builtin
parente2643617d75e53e5a69278f8d7382553d1c14cf0 (diff)
downloadgit-33bd598c3902c40c5a10a68aeaa3004484239258.zip
git-33bd598c3902c40c5a10a68aeaa3004484239258.tar.gz
git-33bd598c3902c40c5a10a68aeaa3004484239258.tar.bz2
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')
-rw-r--r--builtin/cat-file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/cat-file.c b/builtin/cat-file.c
index 07bd984..c27268f 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;