git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* (no subject)
@ 2021-08-21 14:40 TECOB270_Ganesh Pawar
  2021-08-21 23:52 ` Jeff King
  0 siblings, 1 reply; 2+ messages in thread
From: TECOB270_Ganesh Pawar @ 2021-08-21 14:40 UTC (permalink / raw)
  To: git

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?

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-21 23:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-21 14:40 TECOB270_Ganesh Pawar
2021-08-21 23:52 ` Jeff King

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).