]> Kevux Git Server - rit/commitdiff
patch-ids: make commit_patch_id() a public helper function
authorXiaolong Ye <xiaolong.ye@intel.com>
Tue, 26 Apr 2016 07:51:21 +0000 (15:51 +0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 26 Apr 2016 17:49:57 +0000 (10:49 -0700)
Make commit_patch_id() available to other builtins.

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
patch-ids.c
patch-ids.h

index b7b3e5a..a4d0016 100644 (file)
@@ -4,7 +4,7 @@
 #include "sha1-lookup.h"
 #include "patch-ids.h"
 
-static int commit_patch_id(struct commit *commit, struct diff_options *options,
+int commit_patch_id(struct commit *commit, struct diff_options *options,
                    unsigned char *sha1)
 {
        if (commit->parents)
index c8c7ca1..eeb56b3 100644 (file)
@@ -13,6 +13,8 @@ struct patch_ids {
        struct patch_id_bucket *patches;
 };
 
+int commit_patch_id(struct commit *commit, struct diff_options *options,
+                   unsigned char *sha1);
 int init_patch_ids(struct patch_ids *);
 int free_patch_ids(struct patch_ids *);
 struct patch_id *add_commit_patch_id(struct commit *, struct patch_ids *);