From mboxrd@z Thu Jan 1 00:00:00 1970 From: Junio C Hamano Subject: [PATCH 10/17] remote.c: read $GIT_DIR/remotes/* with strbuf_gets() Date: Wed, 28 Oct 2015 15:25:54 -0700 Message-ID: <1446071161-15610-11-git-send-email-gitster@pobox.com> References: <1446071161-15610-1-git-send-email-gitster@pobox.com> To: git@vger.kernel.org X-From: git-owner@vger.kernel.org Wed Oct 28 23:34:28 2015 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZrZIW-00015c-98 for gcvg-git-2@plane.gmane.org; Wed, 28 Oct 2015 23:34:24 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964821AbbJ1WeH (ORCPT ); Wed, 28 Oct 2015 18:34:07 -0400 Received: from pb-smtp0.int.icgroup.com ([208.72.237.35]:65003 "EHLO sasl.smtp.pobox.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754583AbbJ1Wd2 (ORCPT ); Wed, 28 Oct 2015 18:33:28 -0400 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-smtp0.pobox.com (Postfix) with ESMTP id 18EEF26A3A; Wed, 28 Oct 2015 18:26:18 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to :subject:date:message-id:in-reply-to:references; s=sasl; bh=f3Sx biAlXY35+lQxFAH0ZHspfh8=; b=k/Y8CHpJ3pJrY458ekN3D0OIkl/lJeA3G/iu k1iavgzEu5tmZ3KRngrsAPUMMPk0PWofWv8VMhLGNoI5kJ7yO79kKYeef8dcUtv4 ml61KtG0QMycgDCnu3NhxlxaekoulGyLLlninxOiWnve1h60GBWjLRLc5C48UAHt n/t1zT8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:subject :date:message-id:in-reply-to:references; q=dns; s=sasl; b=oJGUf0 W8U6ju/7rqX4VWCyrg8evQ80TYgvQjmEHeW9GM9+tXQgPTinmgszGMkKJzFb6lQR WGNkher9Pg5Szy91LQQjrXbqksVA7yc+Mra5I1GKB1m41y17w4/e4d8n8c4osp3i bQX3qOt2qL25rmUnQgWwqk3Uw4kYCi4g4Iun8= Received: from pb-smtp0.int.icgroup.com (unknown [127.0.0.1]) by pb-smtp0.pobox.com (Postfix) with ESMTP id 1126C26A39; Wed, 28 Oct 2015 18:26:18 -0400 (EDT) Received: from pobox.com (unknown [216.239.45.64]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by pb-smtp0.pobox.com (Postfix) with ESMTPSA id 8F67E26A38; Wed, 28 Oct 2015 18:26:17 -0400 (EDT) X-Mailer: git-send-email 2.6.2-423-g5314b62 In-Reply-To: <1446071161-15610-1-git-send-email-gitster@pobox.com> X-Pobox-Relay-ID: E81CA2C2-7DC2-11E5-98FA-6BD26AB36C07-77302942!pb-smtp0.pobox.com Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: 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 --- remote.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/remote.c b/remote.c index 1101f82..90eef22 100644 --- a/remote.c +++ b/remote.c @@ -256,7 +256,7 @@ static void read_remotes_file(struct remote *remote) if (!f) return; remote->origin = REMOTE_REMOTES; - while (strbuf_getline(&buf, f, '\n') != EOF) { + while (strbuf_gets(&buf, f) != EOF) { const char *v; strbuf_rtrim(&buf); -- 2.6.2-423-g5314b62