Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharvi Mendiratta <charvi077@gmail.com>2021-03-15 10:54:31 +0300
committerJunio C Hamano <gitster@pobox.com>2021-03-16 00:29:35 +0300
commit6e0e28877988f8b98eb1e5cf4d4c5d29cc0b7f77 (patch)
treeb6793671726d69ec5847ce61ee4e19db7c05800f /commit.h
parentfa153c1cd7a84accc83e97723af85cf0ab3869e7 (diff)
sequencer: export and rename subject_length()
This function can be used in other parts of git. Let's move the function to commit.c and also rename it to make the name of the function more generic. Mentored-by: Christian Couder <chriscool@tuxfamily.org> Mentored-by: Phillip Wood <phillip.wood@dunelm.org.uk> Helped-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Charvi Mendiratta <charvi077@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.h')
-rw-r--r--commit.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/commit.h b/commit.h
index f4e7b0158e..e65d9b3e75 100644
--- a/commit.h
+++ b/commit.h
@@ -165,6 +165,9 @@ const void *detach_commit_buffer(struct commit *, unsigned long *sizep);
/* Find beginning and length of commit subject. */
int find_commit_subject(const char *commit_buffer, const char **subject);
+/* Return length of the commit subject from commit log message. */
+size_t commit_subject_length(const char *body);
+
struct commit_list *commit_list_insert(struct commit *item,
struct commit_list **list);
int commit_list_contains(struct commit *item,