diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2017-03-31 01:39:59 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-03-31 08:33:55 -0700 |
commit | 1b7ba794d21836f72e5888db63ab790077c04e1b (patch) | |
tree | 7b320b3ab15ac6a85e499619bbfbad3d02c00e69 /builtin/rev-parse.c | |
parent | Convert sha1_array_lookup to take struct object_id (diff) | |
download | tgif-1b7ba794d21836f72e5888db63ab790077c04e1b.tar.xz |
Convert sha1_array_for_each_unique and for_each_abbrev to object_id
Make sha1_array_for_each_unique take a callback using struct object_id.
Since one of these callbacks is an argument to for_each_abbrev, convert
those as well. Rename various functions, replacing "sha1" with "oid".
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/rev-parse.c')
-rw-r--r-- | builtin/rev-parse.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/rev-parse.c b/builtin/rev-parse.c index 1e5bdea0d5..8d635add8f 100644 --- a/builtin/rev-parse.c +++ b/builtin/rev-parse.c @@ -205,9 +205,9 @@ static int anti_reference(const char *refname, const struct object_id *oid, int return 0; } -static int show_abbrev(const unsigned char *sha1, void *cb_data) +static int show_abbrev(const struct object_id *oid, void *cb_data) { - show_rev(NORMAL, sha1, NULL); + show_rev(NORMAL, oid->hash, NULL); return 0; } |