Getting full file paths in git merge

I am working on a tool for analyzing the output of merging many branches of a topic and preparing a detailed conflict report. I ran into a small problem in that sometimes Git will generate a truncated file name in the output of the merge command, for example

Merge made by recursive.
 .../somepath/anotherpath/toolong/default.css     |    2 +-

If in other cases it gives the full path

Auto-merging thefullpath/to/myfile/default.jsp

I would like to always have a full path to map files between merges.

+5
source share
1 answer

I am a little confused by your ultimate goal, but I think I can give an answer anyway.

, , .. , git status --porcelain. ( ) man-. git merge --no-commit, , , (). git diff HEAD --numstat, / .

, git diff-tree:

git diff-tree -c --numstat <commit>

-c , diff merge , --numstat , .

, , -p --numstat, . , gitk, , , ​​/ . , , (, '+ ', ' -', , ), , , (--, ++). , . ( , , - --numstat .)

+2

All Articles