Thread (30 messages) flat view 30 messages, 7 authors, 2021-09-24

Re: [PATCH 1/5] grep: stop modifying buffer in strip_timestamp

From: Carlo Arenas <hidden>
Date: 2021-09-21 05:18:41

On Mon, Sep 20, 2021 at 9:09 PM Jeff King [off-list ref] wrote:
quoted hunk ↗ jump to hunk
@@ -971,7 +966,7 @@ static int match_one_pattern(struct grep_pat *p, char *bol, char *eol,
                switch (p->field) {
                case GREP_HEADER_AUTHOR:
                case GREP_HEADER_COMMITTER:
-                       saved_ch = strip_timestamp(bol, &eol);
+                       strip_timestamp(bol, &eol);
Why not something like (plus added error handling, even if it seems
the original didn't have them)?

  eol = strrchr(bol, '>');

Carlo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help