diff options
author | René Scharfe <rene.scharfe@lsrfire.ath.cx> | 2011-12-17 11:20:07 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-12-17 18:22:29 -0800 |
commit | 82889295e76200714d76e0f7beb07b6b9e3b5a88 (patch) | |
tree | 87524b426e19ded411d2c42b44a5b49a24ace97e /combine-diff.c | |
parent | 0041f09de6e62efc31c860487f04e8b08bce68c8 (diff) | |
download | git-82889295e76200714d76e0f7beb07b6b9e3b5a88.tar.gz |
pass struct commit to diff_tree_combined_merge()
Instead of passing the hash of a commit and then searching that
same commit in the single caller, simply pass the commit directly.
Signed-off-by: René Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'combine-diff.c')
-rw-r--r-- | combine-diff.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/combine-diff.c b/combine-diff.c index cfe62303a8..a2e8dcf855 100644 --- a/combine-diff.c +++ b/combine-diff.c @@ -1196,10 +1196,9 @@ void diff_tree_combined(const unsigned char *sha1, } } -void diff_tree_combined_merge(const unsigned char *sha1, - int dense, struct rev_info *rev) +void diff_tree_combined_merge(const struct commit *commit, int dense, + struct rev_info *rev) { - struct commit *commit = lookup_commit(sha1); struct commit_list *parent = commit->parents; struct sha1_array parents = SHA1_ARRAY_INIT; @@ -1207,6 +1206,6 @@ void diff_tree_combined_merge(const unsigned char *sha1, sha1_array_append(&parents, parent->item->object.sha1); parent = parent->next; } - diff_tree_combined(sha1, &parents, dense, rev); + diff_tree_combined(commit->object.sha1, &parents, dense, rev); sha1_array_clear(&parents); } |