From: TECOB270_Ganesh Pawar <pawarg256@gmail.com>
To: git@vger.kernel.org
Subject:
Date: Sat, 21 Aug 2021 20:10:59 +0530 [thread overview]
Message-ID: <CAAOR--EV5iixus=wY4ukO2VpE6Ktr=XtKB58FDCyUZ0OvqLuAQ@mail.gmail.com> (raw)
I'm not sure if this is a bug.
To reproduce:
1. Set the contents of .git/hooks/prepare-commit-msg to this:
```
#!/bin/sh
COMMIT_MSG_FILE=$1
echo "Initial Commit." > "$COMMIT_MSG_FILE"
echo "" >> "$COMMIT_MSG_FILE"
echo "# Some random comment." >> "$COMMIT_MSG_FILE"
```
Notice the comment being added to the file.
2. Append a commit with the --no-edit flag.
`git commit --amend --no-edit`
The comment ("Some random comment" in this case) is included in the
final commit message, but it shouldn't right?
If I don't pass the flag and just save the commit without changing
anything, the comment isn't included. Shouldn't this be the case with
the --no-edit flag too?
next reply other threads:[~2021-08-21 14:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-21 14:40 TECOB270_Ganesh Pawar [this message]
2021-08-21 23:52 ` 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='CAAOR--EV5iixus=wY4ukO2VpE6Ktr=XtKB58FDCyUZ0OvqLuAQ@mail.gmail.com' \
--to=pawarg256@gmail.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.