From: Dylan Brotherston <dylanb@cse.unsw.edu.au>
To: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Possible Bug with `git commit -a` in v2.41.0
Date: Tue, 4 Jul 2023 04:18:42 +1000 [thread overview]
Message-ID: <ZKMRAkH1r2mQ85Ff@vx12.orchestra.cse.unsw.EDU.AU> (raw)
`git commit -a` is unable to remove the last file in the index in v2.41.0
comparing git version 2.30.2 to 2.41.0
```
$ git --version
git version 2.30.2
$ git init
Initialized empty Git repository in /tmp/tmp.vXqq6iVaqq/.git/
$ echo "foo" > a
$ git add a
$ git commit -m "C1"
[master (root-commit) b3abdc4] C1
1 file changed, 1 insertion(+)
create mode 100644 a
$ rm a
$ git commit -a -m "C2"
[master c3d4c44] C2
1 file changed, 1 deletion(-)
delete mode 100644 a
```
```
$ git --version
git version 2.41.0
$ git init
Initialized empty Git repository in /tmp/tmp.vXqq6iVaqq/.git/
$ echo "foo" > a
$ git add a
$ git commit -m "C1"
[master (root-commit) af7c07d] C1
1 file changed, 1 insertion(+)
create mode 100644 a
$ rm a
$ git commit -a -m "C2"
On branch master
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
deleted: a
no changes added to commit (use "git add" and/or "git commit -a")
```
- Dylan Brotherston
next reply other threads:[~2023-07-03 18:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-03 18:18 Dylan Brotherston [this message]
2023-07-03 19:29 ` Possible Bug with `git commit -a` in v2.41.0 Jeff King
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=ZKMRAkH1r2mQ85Ff@vx12.orchestra.cse.unsw.EDU.AU \
--to=dylanb@cse.unsw.edu.au \
--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).