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 b7b3e5a1a700d4d2e1656c605697c2cf6345b8a6..a4d00166646d3dc354f3c06e9e75ce7dc3724f6a 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 c8c7ca110ad34def12a3594a1560b3c3052eb701..eeb56b307f602773a41ea3b8cb22d89959c4f9d9 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 *);