Skip to content

Commit 18814d0

Browse files
committed
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 <[email protected]>
1 parent 1f3b1ef commit 18814d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

remote.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ static void read_remotes_file(struct remote *remote)
256256
if (!f)
257257
return;
258258
remote->origin = REMOTE_REMOTES;
259-
while (strbuf_getline_lf(&buf, f) != EOF) {
259+
while (strbuf_getline(&buf, f) != EOF) {
260260
const char *v;
261261

262262
strbuf_rtrim(&buf);

0 commit comments

Comments
 (0)