git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: David Lang <david.lang@digitalinsight.com>
To: Junio C Hamano <junkio@cox.net>
Cc: Linus Torvalds <torvalds@linux-foundation.org>, git@vger.kernel.org
Subject: Re: [RFR] gitattributes(5) documentation
Date: Sun, 22 Apr 2007 02:33:53 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.63.0704220221160.5946@qynat.qvtvafvgr.pbz> (raw)
In-Reply-To: <7vmz10q4cx.fsf@assigned-by-dhcp.cox.net>

On Sun, 22 Apr 2007, Junio C Hamano wrote:

> David Lang <david.lang@digitalinsight.com> writes:
>
>> in the long run this would let you phase out the core.autocrlf option
>> entirely, letting the bahavior be specified in gitattributes.
>
> You _could_, but that is quite against what we want.  These
> should stay separate, and the gitattributes mechanism is
> designed specifically to allow them cleanly separated.
>
> The configuration "core.autcrlf" describes a particular
> repository.  If the platform the repository is on expects text
> files to be line-terminated with CRLF, you would have
> core.autocrlf set; otherwise you don't.
>
> On the other hand, gitattributes' 'crlf' describes if the path
> is text, and that is the reason it can and should be "in-tree",
> i.e. not just $GIT_DIR/info/attributes (which is private to the
> repository) but in .gitattributes (and subdirectories'), which
> is given to everybody who has a copy of the project.

I was thinking that it should be in $GIT_DIR/info/gitattributes along with the 
rest of the crlf defintitions.

> How text files are handled is a local matter, and stays in the
> config.  Which ones are text is the same for everybody who has a
> copy of the project, and is in-tree information.

I understand what you are aiming for, but you are depending on people doing the 
defining of what files are text in the .gitattributes files instead of 
$GIT_DIR/info/gitattributes, which is also valid to do with things as currently 
defined (at least if I'm understanding them correctly)

what you really do want for crlf is one variable that, if set, uses the value of 
another variable.

i wonder if this is useful enough to define formally. something along the lines 
of
[default] crlf=input
in the $GIT_DIR/info/gitattributes file

at the moment we have crlf (set by core.autocrlf) and merge (set by the 
environment variable), I think I saw that it may also be possible to define a 
different diff to use by default as well (possibly by useing a third method to 
define the default, possibly by an environment variable, I don't remember)

if you could set the defaults in the $GIT_DIR/info/gitattributes file and then 
have the flag set/unset/set-to-value in the whatever gitattributes file(s) are 
appropriate, it would consolodate the configurations into one related place 
rather then spreading them around with different ways to set the defaults for 
different things.

David Lang

  reply	other threads:[~2007-04-22 10:07 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-09  8:17 What's cooking in git.git (topics) Junio C Hamano
2007-04-16  1:53 ` Junio C Hamano
2007-04-19  0:04   ` Junio C Hamano
     [not found]     ` <7vslav4yv6.fsf_ -_@assigned-by-dhcp.cox.net>
2007-04-19  0:23     ` Alex Riesen
2007-04-19  2:39     ` Nicolas Pitre
2007-04-19 10:07     ` Martin Waitz
2007-04-20 11:14       ` Junio C Hamano
2007-04-20 11:58         ` Alex Riesen
2007-04-20 19:31         ` Sam Ravnborg
2007-04-21  6:09           ` Martin Waitz
2007-04-21  7:11             ` Linus Torvalds
2007-04-20  1:29     ` [RFR] gitattributes(5) documentation Junio C Hamano
2007-04-20  1:45       ` Linus Torvalds
2007-04-20  5:02         ` Junio C Hamano
2007-04-22  0:51           ` David Lang
2007-04-22  7:02             ` Junio C Hamano
2007-04-22  9:33               ` David Lang [this message]
2007-04-20  1:57       ` Nicolas Pitre
2007-04-22  6:24     ` What's cooking in git.git (topics) Junio C Hamano
2007-04-23  7:04       ` Junio C Hamano
2007-04-23 16:16         ` Nicolas Pitre
2007-04-23 17:07         ` Alex Riesen
2007-04-23 17:15           ` Junio C Hamano
2007-04-23 21:16             ` Alex Riesen
2007-04-23 21:51               ` Junio C Hamano
2007-04-24 15:58                 ` Alex Riesen
2007-04-24 16:04                   ` Johannes Schindelin
2007-04-24 16:14                     ` Alex Riesen
2007-04-24 16:44                       ` Johannes Schindelin
2007-04-24 21:41                   ` Junio C Hamano
2007-04-25  8:11                     ` Alex Riesen
2007-04-23 17:25           ` Johannes Schindelin
2007-04-27  8:24         ` Junio C Hamano
2007-04-29 18:33           ` Junio C Hamano
2007-04-29 18:45             ` Linus Torvalds
2007-04-30 23:20               ` Junio C Hamano
2007-05-06  8:53             ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.63.0704220221160.5946@qynat.qvtvafvgr.pbz \
    --to=david.lang@digitalinsight.com \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).