[PATCH 3/5] notes: read copied notes with strbuf_getline()
The notes that are copied from stdin are trimmed with strbuf_rtrim()
after splitting by ' '. There is thus no logic expecting CR, so
strbuf_getline_lf() can be replaced by its CRLF counterpart.Signed-off-by: Moritz Neeb <lists@moritzneeb.de>
---
builtin/notes.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/notes.c b/builtin/notes.c
index ed6f222..bbd7544 100644
--- a/builtin/notes.c
+++ b/builtin/notes.c
@@ -290,7 +290,7 @@ 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 strbuf **split;
int err;
--
2.4.3