git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Stefan Beller <sbeller@google.com>
To: Eric Deplagne <Eric@deplagne.name>
Cc: "Torsten Bögershausen" <tboegi@web.de>,
	"Samuel Lijin" <samuel.lijin@formlabs.com>,
	"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: Minor Bug in Renaming Branches
Date: Tue, 7 Jun 2016 06:09:09 -0700	[thread overview]
Message-ID: <CAGZ79kaDAPAkkEWVS6pEuAxoWht5Z5GmKjs1ii9_bsTViyhnVQ@mail.gmail.com> (raw)
In-Reply-To: <20160607074051.GT22583@mail.eric.deplagne.name>

On Tue, Jun 7, 2016 at 12:40 AM, Eric Deplagne <Eric@deplagne.name> wrote:
> On Tue, 07 Jun 2016 06:13:14 +0200, Torsten Bögershausen wrote:
>> On 06/06/2016 09:35 PM, Stefan Beller wrote:
>>> On Mon, Jun 6, 2016 at 12:17 PM, Torsten Bögershausen <tboegi@web.de> wrote:
>>>
>>>> A limitation is introduced by Mac OS and Windows:
>>>> BRANCH/NAME and branch/name refer to the same object in the file
>>>> system.
>>>> As a workaround, you can pack the branch names:
>>>> git pack-refs --all
>>>
>>> Once you packed a branch into the packed refs file, you can
>>> create another loose branch of different capitalization,
>>> which then 'hides' the packed ref?
>>>
>>> That sounds error prone to me, as a seemingly unrelated branch
>>> changed its value:
>>>
>>>      git branch BRANCH 012345
>>>      git pack-refs --all
>>>      git branch branch BRANCH^
>>>      git rev-parse BRANCH
>>>      (I'd expect BRANCH^ as return)
>>>
>>> (I don't have a windows machine for testing here, so that
>>> is pure speculation)
>>>
>> Yes, another reason not to use branch and BRANCH in the same repo.
>> (You can test under Linux & vfat)
>
>   Or to have git just refuse it altogether...

Maybe we could refuse creation of case different branch
names on case insensitive file systems, but you could have
created them on a case sensitive file system, so you still
have to work with that.

This topic was discussed at the Git Merge this year (again),
and IIRC the outcome was to not restrict outselves to the
lowest common denominator, but rather ¯\_(ツ)_/¯.
People who use case insensitive file systems are aware of
their limitations and would not ever want to do such branch
tricks, right? ;)


>
>   But let me guess, it's against some sort of policy...

I rather think nobody stepped up to present a
solution that doesn't suck. As by the title of this thread,
it's rather minor.

>
>   There could be some hook out there, then ?

The hook to tell the user if that branch name is allowed?

My gut reaction to that is, that such a hook would violate
the principles of the DVCS thinking. A user ought
to do anything they want locally including having naming
rights for their local branches, so we'd not want to restrict
them?

>
> --
>   Eric Deplagne
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iD4DBQFXVnqDej7DisjVpq4RAqxoAJ0eufoN3OXWKGiHrAPolS4SmOHGIwCWJHNl
> jI/aVh12/NM8YZX5oEl4Ww==
> =rwxP
> -----END PGP SIGNATURE-----
>

      reply	other threads:[~2016-06-07 13:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-06 17:52 Minor Bug in Renaming Branches Samuel Lijin
2016-06-06 18:09 ` Stefan Beller
2016-06-06 19:17 ` Torsten Bögershausen
2016-06-06 19:35   ` Stefan Beller
2016-06-07  4:13     ` Torsten Bögershausen
2016-06-07  7:40       ` Eric Deplagne
2016-06-07 13:09         ` Stefan Beller [this message]

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=CAGZ79kaDAPAkkEWVS6pEuAxoWht5Z5GmKjs1ii9_bsTViyhnVQ@mail.gmail.com \
    --to=sbeller@google.com \
    --cc=Eric@deplagne.name \
    --cc=git@vger.kernel.org \
    --cc=samuel.lijin@formlabs.com \
    --cc=tboegi@web.de \
    /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).