我正在编写一个脚本,在这个脚本中,我逐渐将Linux内核合并到一个从旧版本中脱颖而出的分支,并略微修改了它.
结果,git merge <sha> -m "merge without conflict"我的脚本中有很多命令.如果存在冲突,则脚本将停止以供用户解析并使用正确的消息进行合并.
但是,git merge -m "message" ...仍然会调出编辑器,迫使我确认消息.我怎么能阻止这个?
我知道一般来说,拥有一个非描述性的合并消息并不是一个好主意,但这是一个没有产生冲突的消息,它可能会发生数百次,因此每次都要求用户(我自己)进行确认.这个问题.
编辑:情况并非总是如此.但是,这可以重现问题:
# 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
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
792 次 |
| 最近记录: |