Thread (21 messages) flat view 21 messages, 5 authors, 2016-06-15

Re: [PATCH v6 05/11] trailer: parse trailers from stdin

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:00:12

Christian Couder [off-list ref] writes:
quoted hunk ↗ jump to hunk
diff --git a/trailer.c b/trailer.c
index 5d69c00..e0e066f 100644
--- a/trailer.c
+++ b/trailer.c
@@ -50,6 +50,13 @@ static size_t alnum_len(const char *buf, size_t len)
 	return len;
 }
 
+static inline int contains_only_spaces(const char *str)
+{
+	const char *s;
+	for (s = str; *s && isspace(*s); s++);
Have an empty statement on a separate line for readability.  I.e.

	for (...)
        	; /* keep skipping */
quoted hunk ↗ jump to hunk
@@ -471,3 +478,72 @@ static struct trailer_item *process_command_line_args(int argc, const char **arg
...
+static void process_stdin(struct trailer_item **in_tok_first,
+			  struct trailer_item **in_tok_last)
+{
...
+	/* Print non trailer lines as is */
+	for (i = 0; lines[i] && i < start; i++) {
+		printf("%s", lines[i]->buf);
+	}
Needless brace pair.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help