git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Torsten Bögershausen" <tboegi@web.de>
To: Johannes Sixt <j6t@kdbg.org>
Cc: Ax Da <discussion@gmx.net>, git@vger.kernel.org
Subject: Re: Git config "ignorecase = true" has issues
Date: Tue, 21 May 2019 04:31:06 +0200	[thread overview]
Message-ID: <20190521023106.3sfrapksxg6xjtdg@tb-raspi4> (raw)
In-Reply-To: <b75455b6-139a-aa6c-c7f6-7c9330e2ac6f@kdbg.org>

On Sat, May 18, 2019 at 06:38:39PM +0200, Johannes Sixt wrote:
> Am 18.05.19 um 14:58 schrieb Ax Da:
> > You can rename files like this:
> > git mv File.txt file.txt
>
> On a case-insensitive, case-preserving filesystem, a case-only rename
> operation is better performed in two steps that do not just change the case:
>
> git mv File.txt  file.txtx
> git mv file.txtx file.txt

Is this still needed in latest versions of Git, please see below  ?
A quick test shows that both the file is renamed and the index is updated:

user@mac:~/projects/git/git.pu> git mv Makefile MAKEFILE
user@mac:~/projects/git/git.pu> ls -l MAKEFILE
-rw-r--r--  1 tb  staff  100301 Apr 17 16:53 MAKEFILE

user@mac:~/projects/git/git.pu> git status
HEAD detached at git.git/pu
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

        renamed:    Makefile -> MAKEFILE



  commit baa37bff9a845471754d3f47957d58a6ccc30058
  Author: David Turner <dturner@twitter.com>
  Date:   Thu May 8 10:23:34 2014 -0700

    mv: allow renaming to fix case on case insensitive filesystems

    "git mv hello.txt Hello.txt" on a case insensitive filesystem
     always triggers "destination already exists" error, because these
    two names refer to the same path from the filesystem's point of
    view, and requires the user to give "--force" when correcting the
    case of the path recorded in the index and in the next commit.

    Detect this case and allow it without requiring "--force".

    Signed-off-by: David Turner <dturner@twitter.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>


[snip]

  reply	other threads:[~2019-05-21  2:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-18 12:58 Git config "ignorecase = true" has issues Ax Da
2019-05-18 16:38 ` Johannes Sixt
2019-05-21  2:31   ` Torsten Bögershausen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-05-05 10:11 Ax Da
2019-04-19 19:28 Ax Da
2019-04-24 19:11 ` Torsten Bögershausen

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=20190521023106.3sfrapksxg6xjtdg@tb-raspi4 \
    --to=tboegi@web.de \
    --cc=discussion@gmx.net \
    --cc=git@vger.kernel.org \
    --cc=j6t@kdbg.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).