gregsexton / gitv

gitk for Vim.
938 stars 59 forks source link

D (Gdiff) arguments error #4

Closed romainl closed 13 years ago

romainl commented 13 years ago

Hi, I'm unable to launch a diff with shortcut D. Here is the error:

Error detected while processing BufReadCmd Auto commands for "fugitive://**//[0-9a-f][0-9a-f]*":
fugitive: rev-parse aebbbd335eeb2f753b1650180bd31349c4208209:plugin/gitv-1: fatal: Needed a single revision 

Anyway, thank you for your hard work.

gregsexton commented 13 years ago

Not quite sure on this one without a bit more info. What happens if you manually perform a diff by using a command like :Gdiff <sha of your commit to diff against>?

gregsexton commented 13 years ago

Just to be clear. This performs a diff of the current file, in the window below the commit history, with the same file as it was in that commit. If the file in the window below isn't in the repository at the time of the commit your diffing against you might see something like this.

romainl commented 13 years ago

With the file open, :Gdiff 57831bb does exactly what it should: a typical diff with two windows side by side, green and red areas and folds. Doing C on the line corresponding to commit [57831bb] yelds this error:

Error detected while processing BufReadCmd Auto commands for "fugitive://**//[0-9a-f][0-9a-f]*":                       
fugitive: rev-parse 57831bb5c1d3546950c98e1b9233ae499eccff03:gitv-1: fatal: Needed a single revision
romainl commented 13 years ago

Not C, D.

romainl commented 13 years ago

Hum, D works fine when the commit I want to diff against is open in the window below. I was actually expecting D to open both versions for me.

Thanks again, I'm sorry for making you loose your time.

gregsexton commented 13 years ago

Ah, yes this is the problem. Sorry for not explaining clearer. The intention is to diff whatever version of the file you have open in the window below against the commit under the cursor. I will try and work out a solution so that if a window isn't open below, it will do as you expected it to.

Thanks,

Greg