From patchwork Tue Jan 29 12:41:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff King X-Patchwork-Id: 10786149 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9123517E9 for ; Tue, 29 Jan 2019 12:41:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 80A842C094 for ; Tue, 29 Jan 2019 12:41:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7D3692B636; Tue, 29 Jan 2019 12:41:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D738F2C0A6 for ; Tue, 29 Jan 2019 12:41:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728688AbfA2MlJ (ORCPT ); Tue, 29 Jan 2019 07:41:09 -0500 Received: from cloud.peff.net ([104.130.231.41]:52912 "HELO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1727033AbfA2MlJ (ORCPT ); Tue, 29 Jan 2019 07:41:09 -0500 Received: (qmail 25152 invoked by uid 109); 29 Jan 2019 12:41:09 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with SMTP; Tue, 29 Jan 2019 12:41:09 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 6076 invoked by uid 111); 29 Jan 2019 12:41:15 -0000 Received: from sigill.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.7) by peff.net (qpsmtpd/0.94) with (ECDHE-RSA-AES256-GCM-SHA384 encrypted) SMTP; Tue, 29 Jan 2019 07:41:15 -0500 Authentication-Results: peff.net; auth=none Received: by sigill.intra.peff.net (sSMTP sendmail emulation); Tue, 29 Jan 2019 07:41:07 -0500 Date: Tue, 29 Jan 2019 07:41:07 -0500 From: Jeff King To: Torsten =?utf-8?q?B=C3=B6gershausen?= Cc: Junio C Hamano , Sergey Lukashev , "git@vger.kernel.org" Subject: [PATCH v2 1/2] doc/gitattributes: clarify "autocrlf overrides eol" Message-ID: <20190129124107.GA21931@sigill.intra.peff.net> References: <20190129124031.GA13084@sigill.intra.peff.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190129124031.GA13084@sigill.intra.peff.net> Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We only override core.eol with core.autocrlf when the latter is set to something besides "false". Let's make this more clear, and point the reader to the git-config definitions, which discuss this in more detail. Noticed-by: Sergey Lukashev Signed-off-by: Jeff King --- Documentation/gitattributes.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt index b8392fc330..ce383e97dc 100644 --- a/Documentation/gitattributes.txt +++ b/Documentation/gitattributes.txt @@ -124,7 +124,9 @@ text file is normalized, its line endings are converted to LF in the repository. To control what line ending style is used in the working directory, use the `eol` attribute for a single file and the `core.eol` configuration variable for all text files. -Note that `core.autocrlf` overrides `core.eol` +Note that setting `core.autocrlf` to `true` or `input` overrides +`core.eol` (see the definitions of those options in +linkgit:git-config[1]). Set:: From patchwork Tue Jan 29 12:41:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jeff King X-Patchwork-Id: 10786151 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DC92C1399 for ; Tue, 29 Jan 2019 12:41:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CCD942C0AE for ; Tue, 29 Jan 2019 12:41:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CB2102B411; Tue, 29 Jan 2019 12:41:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6860E2B9C7 for ; Tue, 29 Jan 2019 12:41:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728696AbfA2MlO (ORCPT ); Tue, 29 Jan 2019 07:41:14 -0500 Received: from cloud.peff.net ([104.130.231.41]:52920 "HELO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1727033AbfA2MlO (ORCPT ); Tue, 29 Jan 2019 07:41:14 -0500 Received: (qmail 25206 invoked by uid 109); 29 Jan 2019 12:41:14 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with SMTP; Tue, 29 Jan 2019 12:41:14 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 6095 invoked by uid 111); 29 Jan 2019 12:41:20 -0000 Received: from sigill.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.7) by peff.net (qpsmtpd/0.94) with (ECDHE-RSA-AES256-GCM-SHA384 encrypted) SMTP; Tue, 29 Jan 2019 07:41:20 -0500 Authentication-Results: peff.net; auth=none Received: by sigill.intra.peff.net (sSMTP sendmail emulation); Tue, 29 Jan 2019 07:41:12 -0500 Date: Tue, 29 Jan 2019 07:41:12 -0500 From: Jeff King To: Torsten =?utf-8?q?B=C3=B6gershausen?= Cc: Junio C Hamano , Sergey Lukashev , "git@vger.kernel.org" Subject: [PATCH v2 2/2] docs/config: clarify "text property" in core.eol Message-ID: <20190129124112.GB21931@sigill.intra.peff.net> References: <20190129124031.GA13084@sigill.intra.peff.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190129124031.GA13084@sigill.intra.peff.net> Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The word "property" is vague here. Let's spell out that we mean the path must be marked with the text attribute. While we're here, let's make the paragraph a little easier to read by de-emphasizing the "when core.autocrlf is false" bit. Putting it in the first sentence obscures the main content, and many readers won't care about autocrlf (i.e., anyone who is just following the gitattributes(7) advice, which mainly discusses "text" and "core.eol"). Helped-by: Torsten Bögershausen Signed-off-by: Jeff King --- Documentation/config/core.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Documentation/config/core.txt b/Documentation/config/core.txt index d0e6635fe0..7e9b6c8f4c 100644 --- a/Documentation/config/core.txt +++ b/Documentation/config/core.txt @@ -121,11 +121,14 @@ core.quotePath:: core.eol:: Sets the line ending type to use in the working directory for - files that have the `text` property set when core.autocrlf is false. + files that are marked as text (either by having the `text` + attribute set, or by having `text=auto` and Git auto-detecting + the contents as text). Alternatives are 'lf', 'crlf' and 'native', which uses the platform's native line ending. The default value is `native`. See linkgit:gitattributes[5] for more information on end-of-line - conversion. + conversion. Note that this value is ignored if `core.autocrlf` + is set to `true` or `input`. core.safecrlf:: If true, makes Git check if converting `CRLF` is reversible when