Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
sequencer: do not invent whitespace when transforming OIDs
author
Johannes Schindelin
<johannes.schindelin@gmx.de>
Fri, 22 Dec 2017 23:56:00 +0000
(
00:56
+0100)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 27 Dec 2017 20:33:38 +0000
(12:33 -0800)
For commands that do not have an argument, there is no need to append a
trailing space at the end of the line.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sequencer.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
66afa24
)
diff --git
a/sequencer.c
b/sequencer.c
index b005e412a5b04ba6bf2df31157d01bbbe779fd27..4d3f60594cbf0e9ddf2ea78e8c58eca312b4cac0 100644
(file)
--- a/
sequencer.c
+++ b/
sequencer.c
@@
-2586,7
+2586,10
@@
int transform_todos(unsigned flags)
strbuf_addf(&buf, " %s", oid);
}
/* add all the rest */
- strbuf_addf(&buf, " %.*s\n", item->arg_len, item->arg);
+ if (!item->arg_len)
+ strbuf_addch(&buf, '\n');
+ else
+ strbuf_addf(&buf, " %.*s\n", item->arg_len, item->arg);
}
i = write_message(buf.buf, buf.len, todo_file, 0);