summaryrefslogtreecommitdiffstats
path: root/sequencer.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-11-21 22:57:41 +0900
committerJunio C Hamano <gitster@pobox.com>2018-11-21 22:57:42 +0900
commite293824d00c243c6a7afb15324902f693ae751e8 (patch)
tree20c5f5ca2a2067d064cff24eb5c83cbb18436467 /sequencer.c
parentcae598d9980661a978e2df4fb338518f7bf09572 (diff)
parent66e83d9b41f7438cb167b9bb54093ebbf0532437 (diff)
downloadgit-e293824d00c243c6a7afb15324902f693ae751e8.tar.gz
git-e293824d00c243c6a7afb15324902f693ae751e8.zip
Merge branch 'jk/trailer-fixes' into maint
"git interpret-trailers" and its underlying machinery had a buggy code that attempted to ignore patch text after commit log message, which triggered in various codepaths that will always get the log message alone and never get such an input. * jk/trailer-fixes: append_signoff: use size_t for string offsets sequencer: ignore "---" divider when parsing trailers pretty, ref-filter: format %(trailers) with no_divider option interpret-trailers: allow suppressing "---" divider interpret-trailers: tighten check for "---" patch boundary trailer: pass process_trailer_opts to trailer_info_get() trailer: use size_t for iterating trailer list trailer: use size_t for string offsets
Diffstat (limited to 'sequencer.c')
-rw-r--r--sequencer.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sequencer.c b/sequencer.c
index dc2c58d464..b9407f3375 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -225,13 +225,16 @@ static const char *get_todo_path(const struct replay_opts *opts)
* Returns 3 when sob exists within conforming footer as last entry
*/
static int has_conforming_footer(struct strbuf *sb, struct strbuf *sob,
- int ignore_footer)
+ size_t ignore_footer)
{
+ struct process_trailer_options opts = PROCESS_TRAILER_OPTIONS_INIT;
struct trailer_info info;
- int i;
+ size_t i;
int found_sob = 0, found_sob_last = 0;
- trailer_info_get(&info, sb->buf);
+ opts.no_divider = 1;
+
+ trailer_info_get(&info, sb->buf, &opts);
if (info.trailer_start == info.trailer_end)
return 0;
@@ -3828,7 +3831,7 @@ int sequencer_pick_revisions(struct replay_opts *opts)
return res;
}
-void append_signoff(struct strbuf *msgbuf, int ignore_footer, unsigned flag)
+void append_signoff(struct strbuf *msgbuf, size_t ignore_footer, unsigned flag)
{
unsigned no_dup_sob = flag & APPEND_SIGNOFF_DEDUP;
struct strbuf sob = STRBUF_INIT;