Merge branch 'sb/describe-blob'
"git describe $garbage" stopped giving any errors when the garbage happens to be a string with 40 hexadecimal letters. * sb/describe-blob: describe: confirm that blobs actually exist
This commit is contained in:
@ -502,7 +502,7 @@ static void describe(const char *arg, int last_one)
|
||||
|
||||
if (cmit)
|
||||
describe_commit(&oid, &sb);
|
||||
else if (lookup_blob(&oid))
|
||||
else if (sha1_object_info(oid.hash, NULL) == OBJ_BLOB)
|
||||
describe_blob(oid, &sb);
|
||||
else
|
||||
die(_("%s is neither a commit nor blob"), arg);
|
||||
|
Reference in New Issue
Block a user