How can I split two branches with a fugitive?

In fugitive, I can get git status in a new window :Gstatus and in this window to D in the file to get diff in a new split.

It is also possible to get all versions of a file using :Glog , and I can download all previous commits using :Glog -- .

What I would like to do is get a Gstatus window for the difference of the two branches. For example, the theme and development branch, so that I can distinguish between all modified files.

Is it possible to get an interactive window with all the files that have changed between the two commits?

+7
source share
1 answer

Since git does not support mercurial / bazaar status between the two versions, none of the fugitives can do this. git has git diff --name-status instead, but a simple grep indicates that this function is never used by runaways, except to verify that some file is clean (i.e. unmodified) when executed by :Gw and friends.


If you are not afraid of experimental code, you can try aurum , it can bring you a status window with

 AuStatus rev topic wdrev development 

and see vimdiff of a specific file with C (closes the default status window, use let g:aurum_statwincmd='k' to avoid).

Note: with hg-git and vim compiled with + python aurum, more stable code will be used, since mercurial is the main VCS that I use.


Another idea is to use vcscommand, mercurial / bazaar and hg-git / bzr-git. Then the status will be viewed with

 VCSStatus -r topic -r development 

(mercury, I don’t remember how to do it in the market). However, I am not familiar with vcscommand, so I can’t say whether it offers as many interactive functions in the status buffer as there is a fugitive or aurum (it seems that this is not so: nmap <buffer> in git status buffer does not show anything). The above code should work as per the documentation, but I have not tested.

+1
source

All Articles