aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-02-18 19:55:19 -0800
committerJunio C Hamano <gitster@pobox.com>2011-02-18 22:25:51 -0800
commit11f944dd6bdabd003325c85dc60b16389d012361 (patch)
treef6d372789bdf6b1d32afeca5c9a59021e5ce5381 /builtin
parent7ed863a85a6ce2c4ac4476848310b8f917ab41f9 (diff)
downloadgit-11f944dd6bdabd003325c85dc60b16389d012361.tar.gz
git-11f944dd6bdabd003325c85dc60b16389d012361.tar.xz
for_each_hash: allow passing a 'void *data' pointer to callback
For the find_exact_renames() function, this allows us to pass the diff_options structure pointer to the low-level routines. We will use that to distinguish between the "rename" and "copy" cases. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/describe.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/describe.c b/builtin/describe.c
index 342129fdb..3ba26dc81 100644
--- a/builtin/describe.c
+++ b/builtin/describe.c
@@ -63,7 +63,7 @@ static inline struct commit_name *find_commit_name(const unsigned char *peeled)
return n;
}
-static int set_util(void *chain)
+static int set_util(void *chain, void *data)
{
struct commit_name *n;
for (n = chain; n; n = n->next) {
@@ -289,7 +289,7 @@ static void describe(const char *arg, int last_one)
fprintf(stderr, "searching to describe %s\n", arg);
if (!have_util) {
- for_each_hash(&names, set_util);
+ for_each_hash(&names, set_util, NULL);
have_util = 1;
}