[PATCH 0/5] Replacing strbuf_getline_lf() by strbuf_getline() on trimmed input
- From
- Moritz Neeb <lists@moritzneeb.de>
- Date
- Jan 30, 2016, 17:51 UTC
- Message-ID
- <56ACF82B.2030005@moritzneeb.de>
This series deals with strbuf_getline_lf() in certain codepaths: Those, where the input that is read, is trimmed before doing anything that could possibly expect a CR character. As the codepath after trimming can not in any way expect a CR at the end of the line, because trim dropped it before the change, this can be safely done.
The series is an idea out of [1], where Junio proposed to replace the calls to strbuf_getline_lf() because it 'would [be] a good way to document them as dealing with "text"'. Apart from a general review, I would be happy about comments how I can improve this (and future) patches, as this is my first one. Especially I am not sure about how many arguments from the discussion on the mailing list should be put into the commits.
-Moritz
[1] http://thread.gmane.org/gmane.comp.version-control.git/284104
Moritz Neeb (5): bisect: read bisect paths with strbuf_getline() clean: read user input with strbuf_getline() notes: read copied notes with strbuf_getline() remote: read $GIT_DIR/branches/* with strbuf_getline() wt-status: read rebase todolist with strbuf_getline()
bisect.c | 2 +- builtin/clean.c | 6 +++--- builtin/notes.c | 2 +- remote.c | 2 +- wt-status.c | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-)
-- 2.4.3