From: Johan Herland <johan@herland.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Shawn Pearce <spearce@spearce.org>
Subject: Re: RFD: Handling case-colliding filenames on case-insensitive filesystems
Date: Thu, 24 Feb 2011 01:58:24 +0100 [thread overview]
Message-ID: <201102240158.24363.johan@herland.net> (raw)
In-Reply-To: <7vfwre8sax.fsf@alter.siamese.dyndns.org>
On Wednesday 23 February 2011, Junio C Hamano wrote:
> I think two things are sensible to do, are relatively low hanging fruits,
> and are of low risk:
>
> - break checkout on such a tree on incapable filesystems; and
Wouldn't that be a regression from the current state (where the poor user in
a case-insensitive worktree can at least "git rm" the offending files, and
keep working without assistance from a case-sensitive worktree)?
What about giving a warning on checkout, instead, explaining the problem,
and advising that - for now - the user can remove the offending files with
"git rm"?
> - per project configuration (or attribute given to paths underneath a
> particular directory) that forbids or warns addition of case colliding
> paths to the index; enforce it at write_index() codepath; and
>
> - if we choose to just warn in the second item above instead of
> downright forbidding, barf in cache_tree_update() codepath when the per
> project configuration (or attribute) triggers upon case colliding paths,
> to prevent a commit from being made.
I support making this a per-project configuration that will trigger at tree-
creation (i.e. commit) time. I would even argue that the default should be
to warn about (though maybe not refuse) case-colliding filenames, since they
are either (a) directly harmful for cross-platform projects, or (b) probably
unwanted in most projects anyway.
Having a per-project configuration sure beats trying to solve the problem in
a hook script (using "pre-commit" introduces the logistical problem making
sure everybody installs/enables the hook, whereas using "update" requires
(precious) server runtime, triggers too late in the developer's workflow
(forcing developer to amend/rebase), and probably confuses newbie developers
as well).
> I think "warn at add time, fail at write-tree time" is more preferrable,
> as it might be more convenient if you can add hello.c while you still
> have HELLO.c in the index as long as you do not forget to remove HELLO.c
> from the index before making your next commit.
Agreed.
...Johan
--
Johan Herland, <johan@herland.net>
www.herland.net
next prev parent reply other threads:[~2011-02-24 0:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-23 17:11 RFD: Handling case-colliding filenames on case-insensitive filesystems Johan Herland
2011-02-23 18:56 ` Junio C Hamano
2011-02-23 19:01 ` Shawn Pearce
2011-02-23 19:27 ` Junio C Hamano
2011-02-24 0:58 ` Johan Herland [this message]
2011-02-24 1:26 ` Junio C Hamano
2011-02-24 8:50 ` Johan Herland
2011-02-23 19:07 ` Jay Soffian
2011-02-23 19:17 ` Matthieu Moy
2011-02-23 22:52 ` Marc Branchaud
2011-02-23 23:09 ` Greg Troxel
2011-02-24 0:30 ` Johan Herland
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=201102240158.24363.johan@herland.net \
--to=johan@herland.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=spearce@spearce.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.
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.