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>
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user