summaryrefslogtreecommitdiff
path: root/diff.h
diff options
context:
space:
mode:
authorRené Scharfe <rene.scharfe@lsrfire.ath.cx>2011-12-17 11:15:48 +0100
committerJunio C Hamano <gitster@pobox.com>2011-12-17 18:21:37 -0800
commit0041f09de6e62efc31c860487f04e8b08bce68c8 (patch)
tree85d855657c9a8a94ab39a82773362e5b1abd66f6 /diff.h
parentee228024933069b93ce23a1bd5eeb7ae12c792f2 (diff)
downloadgit-0041f09de6e62efc31c860487f04e8b08bce68c8.tar.gz
use struct sha1_array in diff_tree_combined()
Maintaining an array of hashes is easier using sha1_array than open-coding it. This patch also fixes a leak of the SHA1 array in diff_tree_combined_merge(). Signed-off-by: René Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.h')
-rw-r--r--diff.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/diff.h b/diff.h
index 0c51724493..96085cbb0f 100644
--- a/diff.h
+++ b/diff.h
@@ -12,6 +12,7 @@ struct diff_queue_struct;
struct strbuf;
struct diff_filespec;
struct userdiff_driver;
+struct sha1_array;
typedef void (*change_fn_t)(struct diff_options *options,
unsigned old_mode, unsigned new_mode,
@@ -195,7 +196,7 @@ struct combine_diff_path {
extern void show_combined_diff(struct combine_diff_path *elem, int num_parent,
int dense, struct rev_info *);
-extern void diff_tree_combined(const unsigned char *sha1, const unsigned char parent[][20], int num_parent, int dense, struct rev_info *rev);
+extern void diff_tree_combined(const unsigned char *sha1, const struct sha1_array *parents, int dense, struct rev_info *rev);
extern void diff_tree_combined_merge(const unsigned char *sha1, int, struct rev_info *);