提交 18814d0e 编写于 作者: J Junio C Hamano

remote.c: read $GIT_DIR/remotes/* with strbuf_getline()

These files can be edited with a DOS editor, leaving CR at the end
of the line if read with strbuf_getline().
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 1f3b1efd
......@@ -256,7 +256,7 @@ static void read_remotes_file(struct remote *remote)
if (!f)
return;
remote->origin = REMOTE_REMOTES;
while (strbuf_getline_lf(&buf, f) != EOF) {
while (strbuf_getline(&buf, f) != EOF) {
const char *v;
strbuf_rtrim(&buf);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册