Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: Getting the full path of a conflicting file within a custom merge driver?

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:05:05

"Gondek, Andreas" [off-list ref] writes:
I'm wondering if there is no option to find out the full path of a
conflicting file from within a custom merge driver? If I understand
this correctly, Git only provides the name of the 3 temporary local
files and the size of the limiter. But is there any possibility to get
the path of the file via a Git command, that I can run from within the
merge driver? Maybe as part of the repository's status?
Short answer is "no", as the merge driver interface was originally
designed for a backend that can do its job with only the contents of
the three variants without any other information.  Imagine the
interface to things like "merge" from the RCS suite where it takes
three variants as the input---for them, the same three-tuple of
original, mine and theirs contents should merge to identical result
no matter where in the working tree the conflicts happened.

Having said that, I do not think it is unreasonable to feed more
information to external merge driver, perhaps by adding a new
environment variable GIT_MERGE_CONFLICTED_PATH exported when the
driver is run, or something.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help