зеркало из https://github.com/microsoft/git.git
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: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
1f3b1efd18
Коммит
18814d0e2d
2
remote.c
2
remote.c
|
@ -256,7 +256,7 @@ static void read_remotes_file(struct remote *remote)
|
||||||
if (!f)
|
if (!f)
|
||||||
return;
|
return;
|
||||||
remote->origin = REMOTE_REMOTES;
|
remote->origin = REMOTE_REMOTES;
|
||||||
while (strbuf_getline_lf(&buf, f) != EOF) {
|
while (strbuf_getline(&buf, f) != EOF) {
|
||||||
const char *v;
|
const char *v;
|
||||||
|
|
||||||
strbuf_rtrim(&buf);
|
strbuf_rtrim(&buf);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче