Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit 3fc0dca

Browse files
chriscoolgitster
authored andcommitted
sha1_file: move comment about return value where it belongs
Commit 5b08640 (sha1_object_info_extended: make type calculation optional, Jul 12 2013) changed the return value of the sha1_object_info_extended function to 0/-1 for success/error. Previously this function returned the object type for success or -1 for error. But unfortunately the above commit forgot to change or move the comment above this function that says "returns enum object_type or negative". To fix this inconsistency, let's move the comment above the sha1_object_info function where it is still true. Signed-off-by: Christian Couder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ca46280 commit 3fc0dca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sha1_file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2444,7 +2444,6 @@ static int sha1_loose_object_info(const unsigned char *sha1,
24442444
return 0;
24452445
}
24462446

2447-
/* returns enum object_type or negative */
24482447
int sha1_object_info_extended(const unsigned char *sha1, struct object_info *oi)
24492448
{
24502449
struct cached_object *co;
@@ -2493,6 +2492,7 @@ int sha1_object_info_extended(const unsigned char *sha1, struct object_info *oi)
24932492
return 0;
24942493
}
24952494

2495+
/* returns enum object_type or negative */
24962496
int sha1_object_info(const unsigned char *sha1, unsigned long *sizep)
24972497
{
24982498
enum object_type type;

0 commit comments

Comments
 (0)