From: David Turner <dturner@twopensource.com>
To: git mailing list <git@vger.kernel.org>
Subject: RFC: optionally reject case-clone branch names
Date: Tue, 27 May 2014 18:56:08 -0400 [thread overview]
Message-ID: <1401231368.18134.63.camel@stross> (raw)
At present, it is possible to have two branches which are the same but
for case. This works great on the case-sensitive filesystems, but not
so well on case-insensitive filesystems. It is fairly typical to have
case-insensitive clients (Macs, say) with a case-sensitive server
(GNU/Linux).
Should you attempt to pull on a Mac when you have case-clone branches
with differing contents, you'll get an error message containing
something like "Ref refs/remotes/origin/lower is at
[sha-of-lowercase-branch] but expected [sha-of-uppercase-branch]....
(unable to update local ref)"
Fortunately, nobody uses Macs for git servers, because on a Mac server,
if you push a branch called capital-M Master (that differs from
lowercase-m-master), nobody else can push to (lowercase-m) master until
the branch is removed. Once the branch has been removed, it can no
longer be recreated.
I think a git client that used only packed-refs would not have any
problems with case-sensitivity of branch names, but I assume that there
are good reasons this hasn't yet been done. At any rate, there are
plenty of older clients out there.
RFC follows:
1. On a case-insensitive server, git receive-pack ought to always reject
branches which are same-but-for-case of existing branches.
2. On a case-sensitive server, the same rule by default, with an option
to allow the old behavior.
Let me know if, should I write these patches, they would be likely to be
accepted.
next reply other threads:[~2014-05-27 22:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-27 22:56 David Turner [this message]
2014-05-28 17:14 ` RFC: optionally reject case-clone branch names Junio C Hamano
2014-05-28 17:56 ` David Turner
2014-05-28 21:58 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1401231368.18134.63.camel@stross \
--to=dturner@twopensource.com \
--cc=git@vger.kernel.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 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 NNTP newsgroup(s).