git-svn: allow dcommit for those who only fetch from SVM with useSvmProps
[gitweb.git] / commit.c
index 9b2b842e7dcc153a12b35394a2e3f88f146b6225..8d279b0b635f58482b5a45c6a8a0086744b0735d 100644 (file)
--- a/commit.c
+++ b/commit.c
@@ -47,7 +47,8 @@ enum cmit_fmt get_commit_format(const char *arg)
        if (*arg == '=')
                arg++;
        for (i = 0; i < ARRAY_SIZE(cmt_fmts); i++) {
-               if (!strncmp(arg, cmt_fmts[i].n, cmt_fmts[i].cmp_len))
+               if (!strncmp(arg, cmt_fmts[i].n, cmt_fmts[i].cmp_len) &&
+                   !strncmp(arg, cmt_fmts[i].n, strlen(arg)))
                        return cmt_fmts[i].v;
        }
 
@@ -1186,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;
                }