summaryrefslogtreecommitdiff
path: root/builtin/rev-parse.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-01-29 00:10:14 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-01-29 00:10:14 (GMT)
commitb62624b51a54325e6884c197352dc0dcef700325 (patch)
tree2a5c68bae2133bbb762253f183abcc6f00f8faef /builtin/rev-parse.c
parent116a866bf50da9b893623ebb940e1c6bff7a29bc (diff)
parent1a0c8dfd89475d6bb09ddee8c019cf0ae5b3bdc2 (diff)
downloadgit-b62624b51a54325e6884c197352dc0dcef700325.zip
git-b62624b51a54325e6884c197352dc0dcef700325.tar.gz
git-b62624b51a54325e6884c197352dc0dcef700325.tar.bz2
Merge branch 'jc/strbuf-getline'
The preliminary clean-up for jc/peace-with-crlf topic. * jc/strbuf-getline: strbuf: give strbuf_getline() to the "most text friendly" variant checkout-index: there are only two possible line terminations update-index: there are only two possible line terminations check-ignore: there are only two possible line terminations check-attr: there are only two possible line terminations mktree: there are only two possible line terminations strbuf: introduce strbuf_getline_{lf,nul}() strbuf: make strbuf_getline_crlf() global strbuf: miniscule style fix
Diffstat (limited to 'builtin/rev-parse.c')
-rw-r--r--builtin/rev-parse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/rev-parse.c b/builtin/rev-parse.c
index 7e074aa..0324abb 100644
--- a/builtin/rev-parse.c
+++ b/builtin/rev-parse.c
@@ -383,7 +383,7 @@ static int cmd_parseopt(int argc, const char **argv, const char *prefix)
/* get the usage up to the first line with a -- on it */
for (;;) {
- if (strbuf_getline(&sb, stdin, '\n') == EOF)
+ if (strbuf_getline_lf(&sb, stdin) == EOF)
die("premature end of input");
ALLOC_GROW(usage, unb + 1, usz);
if (!strcmp("--", sb.buf)) {
@@ -396,7 +396,7 @@ static int cmd_parseopt(int argc, const char **argv, const char *prefix)
}
/* parse: (<short>|<short>,<long>|<long>)[*=?!]*<arghint>? SP+ <help> */
- while (strbuf_getline(&sb, stdin, '\n') != EOF) {
+ while (strbuf_getline_lf(&sb, stdin) != EOF) {
const char *s;
const char *help;
struct option *o;