The format of a line that is expected when copying notes via stdin is "sha1 sha1". As this is text-only, strbuf_getline() can be used instead of strbuf_getline_lf(). When reading with strbuf_getline() the trimming can be removed. It was necessary before to remove potential CRs inserted through a dos editor. Signed-off-by: Moritz Neeb <lists@xxxxxxxxxxxxx> --- builtin/notes.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/builtin/notes.c b/builtin/notes.c index 22909c7..660c0b7 100644 --- a/builtin/notes.c +++ b/builtin/notes.c @@ -290,12 +290,11 @@ static int notes_copy_from_stdin(int force, const char *rewrite_cmd) t = &default_notes_tree; } - while (strbuf_getline_lf(&buf, stdin) != EOF) { + while (strbuf_getline(&buf, stdin) != EOF) { unsigned char from_obj[20], to_obj[20]; struct string_list split = STRING_LIST_INIT_DUP; int err; - strbuf_rtrim(&buf); string_list_split(&split, buf.buf, ' ', -1); if (split.nr != 2) -- 2.4.3 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html