From: "Torsten Bögershausen" <tboegi@web.de>
To: chengpu lee <okuxxo@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: issue unable to commit file and folder name to upper lower case
Date: Tue, 7 Nov 2023 18:35:57 +0100 [thread overview]
Message-ID: <20231107173557.GA29083@tb-raspi4> (raw)
In-Reply-To: <CAHv3AeCOoEXxpNh=gzjNcKbVyZFaYZ5BzSf3FGL1=pdheNebZw@mail.gmail.com>
On Tue, Nov 07, 2023 at 07:28:14PM +0800, chengpu lee wrote:
> Thank you for filling out a Git bug report!
> Please answer the following questions to help us understand your issue.
>
> What did you do before the bug happened? (Steps to reproduce your issue)
> $ mkdir abc
>
> $ echo "">abc/.keep
>
> $ git status
> On branch master
> Untracked files:
> (use "git add <file>..." to include in what will be committed)
> abc/
>
> $ mv abc Abc
>
> $ git status
> On branch master
> Untracked files:
> (use "git add <file>..." to include in what will be committed)
> Abc/ # rename
> to Abc/ successfully
>
> $ git commit -m "commit Abc/" # commit
>
> $ mv Abc abc
>
> $ git status
> On branch master
> nothing to commit, working tree clean # cannot
> rename again
>
> $ git diff
> >""
>
> $ git add .
>
> $ git commit -m "Cannot rename from Abc/ to abc/"
> On branch master
> nothing to commit, working tree clean # cannot
> commit to right, keep old file name / folder name
>
>
> What did you expect to happen? (Expected behavior)
> It should be correct to new name although just change upper/lower case,
> because other commiter can pull it from repo or improve reading clarity.
>
> What happened instead? (Actual behavior)
> can commit file/folder but cannot fix upper/lower case.
>
> What's different between what you expected and what actually happened?
> git unable to faithfully represent file/folder upper/lower case changes.
>
Yes, that is a restriction in Git, call it a bug, call it a missing feature.
Unless someone fixes it, the recommendation is still to use a workaround:
tb@pc:/tmp/ttt> git mv Abc tmp
tb@pc:/tmp/ttt> git mv tmp abc
tb@pc:/tmp/ttt> git status
On branch master
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
renamed: Abc/.keep -> abc/.keep
tb@pc:/tmp/ttt>
next prev parent reply other threads:[~2023-11-07 17:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-07 11:28 issue unable to commit file and folder name to upper lower case chengpu lee
2023-11-07 17:35 ` Torsten Bögershausen [this message]
2023-11-08 1:48 ` 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=20231107173557.GA29083@tb-raspi4 \
--to=tboegi@web.de \
--cc=git@vger.kernel.org \
--cc=okuxxo@gmail.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 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).