git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Victor Gambier <vgambier@excilys.com>
To: git@vger.kernel.org
Subject: commit following rebase has unexpected commit message
Date: Wed, 4 Aug 2021 16:19:12 +0200	[thread overview]
Message-ID: <CAMsiUYDD3jTyP-pK7PiydECkUAJspzosc8mWNSFpcLru70zXbQ@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1 bytes --]



[-- Attachment #2: git-bugreport-2021-08-04-1558.txt --]
[-- Type: text/plain, Size: 1751 bytes --]

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)

git switch -c first
git switch -c second
[modify a file]
git commit -am "foo"
git switch first
[modify the same file in a conflicting way]
git commit -am "bar"
git rebase second
git restore --staged .
git restore .
git rebase --continue
[modify any file - can be the same file again]
git commit -a

What did you expect to happen? (Expected behavior)

The text editor should pop up and the first line should be blank (no default commit message).

What happened instead? (Actual behavior)

The text editor pops up, and the first four lines of the default commit message seem to pertain to the rebase:

	bar
	
	# Conflicts:
	#	frontend/src/styling/rounds.ts
	
Even though the contents of the commit correctly pertain to the very last changes and are unrelated to the rebase.

What's different between what you expected and what actually happened?

The default commit message.

Anything else you want to add:

A second anomaly is that if you replace the last command with git commit -a --no-edit, the two lines starting with '#' are NOT ignored and will be present in the final commit message.

Please review the rest of the bug report below.
You can delete any lines you don't wish to share.


[System Info]
git version:
git version 2.30.0.windows.2
cpu: x86_64
built from commit: f8cbc844b81bf6b9e72178bbe891a86c8bf5e9e7
sizeof-long: 4
sizeof-size_t: 8
shell-path: /bin/sh
uname: Windows 10.0 18363 
compiler info: gnuc: 10.2
libc info: no libc information available
$SHELL (typically, interactive shell): C:\Program Files\Git\usr\bin\bash.exe


[Enabled Hooks]

             reply	other threads:[~2021-08-04 14:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-04 14:19 Victor Gambier [this message]
2021-08-05 10:02 ` commit following rebase has unexpected commit message Phillip Wood

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=CAMsiUYDD3jTyP-pK7PiydECkUAJspzosc8mWNSFpcLru70zXbQ@mail.gmail.com \
    --to=vgambier@excilys.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.
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).