Git Merge Driver - How to find out full path of merged file?

二次信任 提交于 2020-01-02 15:38:33

问题


in a custom merge driver I need to get the full path of the conflicting file.

Git provides only temporary files located at the root of the repository.

Is there any way to ask Git what file it is trying to merge at the moment?

Any git command that provides this information during the merge?

UPDATE: I mailed to the Git mailing list. At the moment there is no option but my suggestion of an additional Parameter %P (path) may be implemented today.

UPDATE 2015-06-05: My request has been added to git :) https://github.com/git/git/commit/ef45bb1f8156030446658d5bfb3983ce214a9e16

Greetings, Andreas


回答1:


The original path has been added as a new parameter P% that can be used when calling the merge driver.

https://github.com/git/git/commit/ef45bb1f8156030446658d5bfb3983ce214a9e16

I'm looking forward to a further Git release :)



来源:https://stackoverflow.com/questions/30576965/git-merge-driver-how-to-find-out-full-path-of-merged-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!