summaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-02-13 16:50:32 -0800
committerJunio C Hamano <junkio@cox.net>2007-02-13 16:54:35 -0800
commit4a164d48df6bb1b4a771741c63d4437fd2dca0bb (patch)
tree73e3b0ca16e8ea83e9f761af476736c29b24caf9 /commit.c
parentf8f2aaa17297d6b21c84641edc2f6135575a003c (diff)
parent03840fc32d783be6750bf7e41a89687b8c3053eb (diff)
downloadgit-4a164d48df6bb1b4a771741c63d4437fd2dca0bb.tar.gz
Merge branch 'jc/merge-base' (early part)
This contains an evil merge to fast-import, in order to resolve in_merge_bases() update.
Diffstat (limited to 'commit.c')
-rw-r--r--commit.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/commit.c b/commit.c
index 3e8c87294b..8d279b0b63 100644
--- a/commit.c
+++ b/commit.c
@@ -1187,14 +1187,17 @@ struct commit_list *get_merge_bases(struct commit *one,
return result;
}
-int in_merge_bases(struct commit *rev1, struct commit *rev2)
+int in_merge_bases(struct commit *commit, struct commit **reference, int num)
{
struct commit_list *bases, *b;
int ret = 0;
- bases = get_merge_bases(rev1, rev2, 1);
+ if (num == 1)
+ bases = get_merge_bases(commit, *reference, 1);
+ else
+ die("not yet");
for (b = bases; b; b = b->next) {
- if (!hashcmp(rev1->object.sha1, b->item->object.sha1)) {
+ if (!hashcmp(commit->object.sha1, b->item->object.sha1)) {
ret = 1;
break;
}