patch-ids: make commit_patch_id() a public helper function

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>

Xiaolong Ye committed Apr 26, 2016 at 15:51 UTC ded2c097bae67e00f8b4f3f777a516254207ca15
2 files changed +3 -1
patch-ids.c
+1 -1
@@ -4,7 +4,7 @@
4 #include "sha1-lookup.h"
5 #include "patch-ids.h"
6
7 -static int commit_patch_id(struct commit *commit, struct diff_options *options,
7 +int commit_patch_id(struct commit *commit, struct diff_options *options,
8 unsigned char *sha1)
9 {
10 if (commit->parents)
patch-ids.h
+2
@@ -13,6 +13,8 @@ struct patch_ids {
13 struct patch_id_bucket *patches;
14 };
15
16 +int commit_patch_id(struct commit *commit, struct diff_options *options,
17 + unsigned char *sha1);
18 int init_patch_ids(struct patch_ids *);
19 int free_patch_ids(struct patch_ids *);
20 struct patch_id *add_commit_patch_id(struct commit *, struct patch_ids *);