Re: any git developper using gvimdiff ?

2006-08-25 Thread Christian MICHON

nice madcoding :)
work in bash, but not tcsh.
Thanks anyway: I learned something new from it

On 8/21/06, Pierre Habouzit [EMAIL PROTECTED] wrote:

Le lun 21 août 2006 17:31, Christian MICHON a écrit :
 which was the logical conclusion I also came too!
 Thanks for confirming :)

 I now proceed thru a shell script to checkout previous
 version and perform gvimdiff asynchronously to git.

in decent shells you can do:

(g)vimdiff \
 (cat $FILE | (git diff $REV -- $FILE | patch -Rs -o /dev/stdout)) \
 $FILE

$FILE beeing the file you need to vimdiff and $REV the orginal revision.


 - cat $FILE | (git diff $REV -- $FILE | patch -Rs -o /dev/stdout)

that stanza is just a way to obtain the state of $FILE at revision $REV.
I may have overlooked sth and maybe there is a trivial git command
that can do that, if that's true, then you just need to:

 vimdiff (git that-command $REV $FILE) $FILE

that should work in bash 3+ and zsh of any decent version (like in 4.x I
guess).
--
·O·  Pierre Habouzit
··O[EMAIL PROTECTED]
OOOhttp://www.madism.org






--
Christian


Re: any git developper using gvimdiff ?

2006-08-25 Thread Stefano Zacchiroli
On Mon, Aug 21, 2006 at 04:07:21PM +0200, Christian MICHON wrote:
 I'm currently trying out git (linux scm) and I have not found yet
 how to perform a gvimdiff on a file locally modified with the latest
 commit.

Maybe you can adapt this to your needs:

  http://vim.sourceforge.net/scripts/script.php?script_id=1209

-- 
Stefano Zacchiroli -*- Computer Science PhD student @ Uny Bologna, Italy
[EMAIL PROTECTED],debian.org,bononia.it} -%- http://www.bononia.it/zack/
If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. -!-


Re: any git developper using gvimdiff ?

2006-08-25 Thread Pierre Habouzit
Le ven 25 août 2006 17:38, Christian MICHON a écrit :
 nice madcoding :)
 work in bash, but not tcsh.

I said *decent* shell :P

 Thanks anyway: I learned something new from it

you're welcome.
-- 
·O·  Pierre Habouzit
··O[EMAIL PROTECTED]
OOOhttp://www.madism.org


pgpRHPUPrFyMV.pgp
Description: PGP signature


Re: any git developper using gvimdiff ?

2006-08-25 Thread A.J.Mechelynck

Pierre Habouzit wrote:

Le ven 25 août 2006 17:38, Christian MICHON a écrit :

nice madcoding :)
work in bash, but not tcsh.


I said *decent* shell :P


Thanks anyway: I learned something new from it


you're welcome.


Oh, so tcsh is an indecent shell then... :-Þ


Best regards,
Tony.


Re: any git developper using gvimdiff ?

2006-08-21 Thread A.J.Mechelynck

Christian MICHON wrote:

Hi vim-devers,

I'm currently trying out git (linux scm) and I have not found yet
how to perform a gvimdiff on a file locally modified with the latest
commit.

Is there a simple/easy way out for this issue ? Any git
specialist amond vim-dev who could give me a hint ?

Thanks in advance


gvimdiff takes two versions of the same file as arguments, so the 
question boils down to how to get the successive versions of the 
file?. I don't know git (and on SuSE 9.3 I have no program of that name 
in my $PATH) but the command-line for gvimdiff is typically something like


gvimdiff filename.ext.old filename.ext

The answer may be as simple as taking backup copies of your files.


Best regards,
Tony.


Re: any git developper using gvimdiff ?

2006-08-21 Thread Christian MICHON

which was the logical conclusion I also came too!
Thanks for confirming :)

I now proceed thru a shell script to checkout previous
version and perform gvimdiff asynchronously to git.

works like a charm :)

On 8/21/06, A.J.Mechelynck [EMAIL PROTECTED] wrote:

Christian MICHON wrote:
 Hi vim-devers,

 I'm currently trying out git (linux scm) and I have not found yet
 how to perform a gvimdiff on a file locally modified with the latest
 commit.

 Is there a simple/easy way out for this issue ? Any git
 specialist amond vim-dev who could give me a hint ?

 Thanks in advance

gvimdiff takes two versions of the same file as arguments, so the
question boils down to how to get the successive versions of the
file?. I don't know git (and on SuSE 9.3 I have no program of that name
in my $PATH) but the command-line for gvimdiff is typically something like

   gvimdiff filename.ext.old filename.ext

The answer may be as simple as taking backup copies of your files.


Best regards,
Tony.




--
Christian