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>
This commit is contained in:
Xiaolong Ye 2016-04-26 15:51:21 +08:00 committed by Junio C Hamano
parent 90f7b16b3a
commit ded2c097ba
2 changed files with 3 additions and 1 deletions

View 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)

View 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 *);