# [PATCH] Doc: mention the crlf attribute in config autocrlf section

5 messages from 2009-11-14 to 2009-11-17. Participants: Matthew Ogilvie, Nanako Shiraishi, Junio C Hamano.
Thread: https://gitlist.dev/t/21614

## Matthew Ogilvie, 2009-11-14 18:35

Subject: [PATCH] Doc: mention the crlf attribute in config autocrlf section
Message-ID: <1258223700-4009-1-git-send-email-mmogilvi_git@miniinfo.net>
URL: https://gitlist.dev/e/1258223700-4009-1-git-send-email-mmogilvi_git%40miniinfo.net

```
The reverse reference has long existed, and the autocrlf description
was actually obsolete and wrong (saying only file content is used),
not just incomplete.

Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
---
 Documentation/config.txt |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/Documentation/config.txt b/Documentation/config.txt
index d1e2120..0dc6b12 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -169,9 +169,10 @@ core.autocrlf::
 	writing to the filesystem.  The variable can be set to
 	'input', in which case the conversion happens only while
 	reading from the filesystem but files are written out with
-	`LF` at the end of lines.  Currently, which paths to consider
-	"text" (i.e. be subjected to the autocrlf mechanism) is
-	decided purely based on the contents.
+	`LF` at the end of lines.  A file is considered
+	"text" (i.e. be subjected to the autocrlf mechanism) based on
+	the file's `crlf` attribute, or if `crlf` is unspecified,
+	based on the file's contents.  See linkgit:gitattributes[5]. 
 
 core.safecrlf::
 	If true, makes git check if converting `CRLF` as controlled by
-- 
1.6.4.GIT

```

## Nanako Shiraishi, 2009-11-16 10:50

Subject: Re: [PATCH] Doc: mention the crlf attribute in config autocrlf section
Message-ID: <20091116195048.6117@nanako3.lavabit.com>
URL: https://gitlist.dev/e/20091116195048.6117%40nanako3.lavabit.com
In-Reply-To: <1258223700-4009-1-git-send-email-mmogilvi_git@miniinfo.net>

```
Quoting Matthew Ogilvie <mmogilvi_git@miniinfo.net>

> The reverse reference has long existed, and the autocrlf description
> was actually obsolete and wrong (saying only file content is used),
> not just incomplete.

What do you mean by "reverse reference"?

> Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
> ---
>  Documentation/config.txt |    7 ++++---
>  1 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/config.txt b/Documentation/config.txt
> index d1e2120..0dc6b12 100644
> --- a/Documentation/config.txt
> +++ b/Documentation/config.txt
> @@ -169,9 +169,10 @@ core.autocrlf::
>  	writing to the filesystem.  The variable can be set to
>  	'input', in which case the conversion happens only while
>  	reading from the filesystem but files are written out with
> -	`LF` at the end of lines.  Currently, which paths to consider
> -	"text" (i.e. be subjected to the autocrlf mechanism) is
> -	decided purely based on the contents.
> +	`LF` at the end of lines.  A file is considered
> +	"text" (i.e. be subjected to the autocrlf mechanism) based on
> +	the file's `crlf` attribute, or if `crlf` is unspecified,
> +	based on the file's contents.  See linkgit:gitattributes[5]. 
>  
>  core.safecrlf::
>  	If true, makes git check if converting `CRLF` as controlled by

The updated text looks correct to me.

-- 
Nanako Shiraishi
http://ivory.ap.teacup.com/nanako3/

```

## Matthew Ogilvie, 2009-11-17 03:59

Subject: Re: [PATCH] Doc: mention the crlf attribute in config autocrlf section
Message-ID: <20091117035945.GA1728@comcast.net>
URL: https://gitlist.dev/e/20091117035945.GA1728%40comcast.net
In-Reply-To: <20091116195048.6117@nanako3.lavabit.com>

```
On Mon, Nov 16, 2009 at 07:50:48PM +0900, Nanako Shiraishi wrote:
> Quoting Matthew Ogilvie <mmogilvi_git@miniinfo.net>
> 
> > The reverse reference has long existed, and the autocrlf description
> > was actually obsolete and wrong (saying only file content is used),
> > not just incomplete.
> 
> What do you mean by "reverse reference"?
> 

I'm refering to the fact that the "crlf" section of
Documentation/gitattributes.txt mentions core.autocrlf,
which is in the opposite (reverse) direction as this new reference
I'm adding.

The crlf section has a much more thorough description of
the various knobs and settings and how they interact.  But
I just checked, and although the gitattributes crlf section
describes core.autocrlf in reasonable detail, it does not have an
actual link (reference?) to git-config or the core.autocrlf
section.  So the commit message isn't as clear as it could be.

Do I need to resubmit the patch, in order to rephrase the commit
message?

--
Matthew Ogilvie   [mmogilvi_git@miniinfo.net]

```

## Junio C Hamano, 2009-11-17 06:37

Subject: Re: [PATCH] Doc: mention the crlf attribute in config autocrlf section
Message-ID: <7v7htpirmy.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7v7htpirmy.fsf%40alter.siamese.dyndns.org
In-Reply-To: <20091117035945.GA1728@comcast.net>

```
Matthew Ogilvie <mmogilvi_git@miniinfo.net> writes:

> On Mon, Nov 16, 2009 at 07:50:48PM +0900, Nanako Shiraishi wrote:
>> Quoting Matthew Ogilvie <mmogilvi_git@miniinfo.net>
>> 
>> > The reverse reference has long existed, and the autocrlf description
>> > was actually obsolete and wrong (saying only file content is used),
>> > not just incomplete.
>> 
>> What do you mean by "reverse reference"?
>
> I'm refering to the fact that the "crlf" section of
> Documentation/gitattributes.txt mentions core.autocrlf,
> which is in the opposite (reverse) direction as this new reference
> I'm adding.
> ...
> Do I need to resubmit the patch, in order to rephrase the commit
> message?

Thanks; I heard you, as your response was Cc'ed to me as well ;-)

How about this?  I didn't touch the patch text (other than dropping
trailing whitespaces).

commit ff68668695486b72b5f06146eddf85b70841088a
Author: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Date:   Sat Nov 14 11:35:00 2009 -0700

    core.autocrlf documentation: mention the crlf attribute
    
    The description of the configuration variable is obsolete and
    wrong (saying only file content is used), not just incomplete.
    It has used the attribute mechanism for a long time.
    
    The documentation of gitattributes mentions the core.autocrlf
    configuration variable in its description of crlf attribute.
    Refer to the gitattributes documentation from here as well.
    
    Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>

```

## Matthew Ogilvie, 2009-11-17 07:43

Subject: Re: [PATCH] Doc: mention the crlf attribute in config autocrlf section
Message-ID: <20091117074330.GA2813@comcast.net>
URL: https://gitlist.dev/e/20091117074330.GA2813%40comcast.net
In-Reply-To: <7v7htpirmy.fsf@alter.siamese.dyndns.org>

```
On Mon, Nov 16, 2009 at 10:37:09PM -0800, Junio C Hamano wrote:
> How about this?  I didn't touch the patch text (other than dropping
> trailing whitespaces).
> 
> commit ff68668695486b72b5f06146eddf85b70841088a
> Author: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
> Date:   Sat Nov 14 11:35:00 2009 -0700
> 
>     core.autocrlf documentation: mention the crlf attribute
>     
>     The description of the configuration variable is obsolete and
>     wrong (saying only file content is used), not just incomplete.
>     It has used the attribute mechanism for a long time.
>     
>     The documentation of gitattributes mentions the core.autocrlf
>     configuration variable in its description of crlf attribute.
>     Refer to the gitattributes documentation from here as well.
>     
>     Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
>     Signed-off-by: Junio C Hamano <gitster@pobox.com>

Looks good.  Sorry about the extra space in the patch text;
stripping it sounds good as well.

--
Matthew Ogilvie   [mmogilvi_git@miniinfo.net]

```
