I am working on a script in which I am gradually merging the Linux kernel into a branch that took off from an older version and has slightly modified it.
As a result, I have many git merge <sha> -m "merge without conflict"
commands in my script. If there is a conflict, the script would stop for the user to resolve and commit with the merge with a proper message.
However, git merge -m "message" ...
still brings up the editor, forcing me to confirm the message. How can I prevent this?
I know generally it's not a good idea to have a non-descriptive merge message, but this is one that generated no conflict and it is probably going to happen hundreds of times, so asking the user (myself) for confirmation each time is out of the question.
Edit: This is not always the case. However, this can reproduce the problem:
# Clone Linux's repository
$ git checkout v2.6.38
$ git checkout -b test
$ touch new_file
$ git add new_file
$ git commit
$ git merge v2.6.39 -m "merge message"
# brings up the editor, even though there are no conflicts
Perhaps the --no-edit
flag? The documentation for it says "The --no-edit
option can be used to accept the auto-generated message (this is generally discouraged) when merging an annotated tag..."
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With