Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
builtin/describe: drop hashmap_cmp_fn cast
author
Stefan Beller
<sbeller@google.com>
Sat, 1 Jul 2017 00:28:31 +0000
(17:28 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 5 Jul 2017 20:53:12 +0000
(13:53 -0700)
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/describe.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
7db316b
)
diff --git
a/builtin/describe.c
b/builtin/describe.c
index 8868f00ed0059595b5ce5c05d8905f72a637bcb7..f2f2edf935abf58a3a118c73d80b0f457a8f3986 100644
(file)
--- a/
builtin/describe.c
+++ b/
builtin/describe.c
@@
-55,10
+55,13
@@
static const char *prio_names[] = {
};
static int commit_name_cmp(const void *unused_cmp_data,
};
static int commit_name_cmp(const void *unused_cmp_data,
- const
struct commit_name *cn1
,
- const
struct commit_name *cn2
,
+ const
void *entry
,
+ const
void *entry_or_key
,
const void *peeled)
{
const void *peeled)
{
+ const struct commit_name *cn1 = entry;
+ const struct commit_name *cn2 = entry_or_key;
+
return oidcmp(&cn1->peeled, peeled ? peeled : &cn2->peeled);
}
return oidcmp(&cn1->peeled, peeled ? peeled : &cn2->peeled);
}
@@
-503,7
+506,7
@@
int cmd_describe(int argc, const char **argv, const char *prefix)
return cmd_name_rev(args.argc, args.argv, prefix);
}
return cmd_name_rev(args.argc, args.argv, prefix);
}
- hashmap_init(&names,
(hashmap_cmp_fn)
commit_name_cmp, NULL, 0);
+ hashmap_init(&names, commit_name_cmp, NULL, 0);
for_each_rawref(get_name, NULL);
if (!names.size && !always)
die(_("No names found, cannot describe anything."));
for_each_rawref(get_name, NULL);
if (!names.size && !always)
die(_("No names found, cannot describe anything."));