diff_aligned_abbrev: use "struct oid"

Since we're modifying this function anyway, it's a good time
to update it to the more modern "struct oid". We can also
drop some of the magic numbers in favor of GIT_SHA1_HEXSZ,
along with some descriptive comments.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jeff King
2016-10-20 02:20:07 -04:00
committed by Junio C Hamano
parent d5e3b01e5b
commit d6cece51b8
3 changed files with 14 additions and 12 deletions

2
diff.h
View File

@ -344,7 +344,7 @@ extern void diff_warn_rename_limit(const char *varname, int needed, int degraded
* This is different from find_unique_abbrev() in that
* it stuffs the result with dots for alignment.
*/
extern const char *diff_aligned_abbrev(const unsigned char *sha1, int);
extern const char *diff_aligned_abbrev(const struct object_id *sha1, int);
/* do not report anything on removed paths */
#define DIFF_SILENT_ON_REMOVED 01