threads / patch / 21614

patchDoc: mention the crlf attribute in config autocrlf section

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

## tl;dr

5 messages between Nov 14, 2009 and Nov 17, 2009. Diffs are folded; open one to read it.

replies: 4people: 3as markdown or json

Matthew Ogilvie· Nov 14, 2009, 18:35 UTC · lore

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(-)
Show changes to Documentation/config.txt +4 −3
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· Nov 16, 2009, 10:50 UTC · re: Matthew Ogilvie · lore

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

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"?
Show 23 quoted lines
> 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· Nov 17, 2009, 03:59 UTC · re: Nanako Shiraishi · lore

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

On Mon, Nov 16, 2009 at 07:50:48PM +0900, Nanako Shiraishi wrote:
Show 8 quoted lines
> 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· Nov 17, 2009, 06:37 UTC · re: Matthew Ogilvie · lore

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

Matthew Ogilvie <mmogilvi_git@miniinfo.net> writes:
Show 16 quoted lines
> 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· Nov 17, 2009, 07:43 UTC · re: Junio C Hamano · lore

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

On Mon, Nov 16, 2009 at 10:37:09PM -0800, Junio C Hamano wrote:
Show 19 quoted lines
> 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]

← back to recent threads