All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Lars Schneider <larsxschneider@gmail.com>
Cc: Dakota Hawkins <dakota@dakotahawkins.com>,
	Duy Nguyen <pclouds@gmail.com>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Stefan Beller <sbeller@google.com>, git <git@vger.kernel.org>
Subject: Re: [RFC] Case insensitive Git attributes
Date: Mon, 23 Jan 2017 11:38:06 -0800	[thread overview]
Message-ID: <xmqqwpdlr2ht.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <xmqq1svtshnr.fsf@gitster.mtv.corp.google.com> (Junio C. Hamano's message of "Mon, 23 Jan 2017 11:25:12 -0800")

Junio C Hamano <gitster@pobox.com> writes:

> So you are worried about the case where somebody on a case
> insensitive but case preserving system would do
>
>     $ edit file.txt
>     $ edit .gitattributes
>     $ git add file.txt .gitattributes
>
> and adds "*.TXT	someattr=true" to the attributes file, which
> would set someattr to true on his system for file.txt, but when the
> result is checked out on a case sensitive system, it would behave
> differently because "*.TXT" does not match "file.txt"?
>
> How do other systems address it?  Your Java, Ruby, etc. sources may
> refer to another file with "import" and the derivation of the file
> names from class names or package names would have the same issue,
> isn't it?  Do they have an option that lets you say
>
>     Even though the import statements may say "import a.b.C", we
>     know that the source tarball was prepared on a case insensitive
>     system, and I want you to look for a/b/C.java and a/b/c.java and
>     use what was found.
>
> or something like that?  Same for anything that records other
> filenames in the content to refer to them, like "Makefile".
>
> My knee jerk reaction to that is that .gitattributes and .gitignore
> should not be instructed to go case insensitive on case sensitive
> systems.  If the system is case insensitive but case preserving,
> it probably would make sense not to do case insensitive matching,
> which would prevent the issue from happening in the first place.

Sorry, but there is a slight leap in the above that makes it hard to
track my thought, so let me clarify a bit.  

In the above, I am guessing the answer to the "How do other systems
address it?" question to be "nothing".  And that leads to the
conclusion that it is better to do "nothing on case sensitive
systems, and probably become evem more strict on case insensitive
but case preserving systems", because that will give us a chance to
expose the problem earlier, hopefully even on the originating
system.

  reply	other threads:[~2017-01-23 19:38 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-22 19:25 [RFC] Case insensitive Git attributes Dakota Hawkins
2017-01-23 18:35 ` Junio C Hamano
2017-01-23 18:42   ` Lars Schneider
2017-01-23 19:25     ` Junio C Hamano
2017-01-23 19:38       ` Junio C Hamano [this message]
2017-01-24  9:49         ` Lars Schneider
  -- strict thread matches above, loose matches on Subject: below --
2016-10-17  1:04 Lars Schneider
2016-10-17  3:07 ` Stefan Beller
2016-10-17  4:24   ` Torsten Bögershausen
2016-10-17  8:57   ` Johannes Schindelin
2016-10-17  9:12     ` Duy Nguyen
2016-10-17 10:46       ` Johannes Schindelin
2016-10-17 11:02         ` Duy Nguyen
2016-10-17 17:50           ` Junio C Hamano
2016-10-17  8:55 ` Johannes Schindelin

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

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

  git send-email \
    --in-reply-to=xmqqwpdlr2ht.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=dakota@dakotahawkins.com \
    --cc=git@vger.kernel.org \
    --cc=larsxschneider@gmail.com \
    --cc=pclouds@gmail.com \
    --cc=sbeller@google.com \
    /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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.