diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-11-21 22:57:41 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-11-21 22:57:42 +0900 |
commit | e293824d00c243c6a7afb15324902f693ae751e8 (patch) | |
tree | 20c5f5ca2a2067d064cff24eb5c83cbb18436467 /commit.c | |
parent | Git 2.19.1 (diff) | |
parent | append_signoff: use size_t for string offsets (diff) | |
download | tgif-e293824d00c243c6a7afb15324902f693ae751e8.tar.xz |
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 'commit.c')
-rw-r--r-- | commit.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1787,10 +1787,10 @@ const char *find_commit_header(const char *msg, const char *key, size_t *out_len * Returns the number of bytes from the tail to ignore, to be fed as * the second parameter to append_signoff(). */ -int ignore_non_trailer(const char *buf, size_t len) +size_t ignore_non_trailer(const char *buf, size_t len) { - int boc = 0; - int bol = 0; + size_t boc = 0; + size_t bol = 0; int in_old_conflicts_block = 0; size_t cutoff = wt_status_locate_end(buf, len); |