Git合并驱动程序-如何找出合并文件的完整路径? [英] Git Merge Driver - How to find out full path of merged file?

查看:138
本文介绍了Git合并驱动程序-如何找出合并文件的完整路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在自定义合并驱动程序中,我需要获取冲突文件的完整路径.

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

Git仅提供位于存储库根目录中的临时文件.

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

有什么办法问Git目前要合并的文件吗?

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

是否有任何在合并过程中提供此信息的git命令?

Any git command that provides this information during the merge?

更新: 我已邮寄到Git邮件列表.目前尚无选择,但我今天建议使用其他参数%P(路径).

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.

更新2015-06-05: 我的请求已添加到git :) https://github.com/git/git/commit/ef45bb1f8156030446658d5bfb3983ce214a9e16

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

问候, 安德烈亚斯(Andreas)

Greetings, Andreas

推荐答案

原始路径已添加为新参数P%,可在调用合并驱动程序时使用.

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

我期待Git的进一步发布:)

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

这篇关于Git合并驱动程序-如何找出合并文件的完整路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆