Subject: Re: Does CVS has a easy way to compare file with its previous version?

From: Eric Raible <[email-masked]>
Date: Thu, 2 Jul 2009 18:04:45 +0000 (UTC)

Linus Torvalds <torvalds <at> linux-foundation.org> writes:

> On Wed, 1 Jul 2009, Paolo Bonzini wrote:
> > 
> > I think he wants something more like
> > 
> > git diff `git log -2 --pretty=format:%h` <file> -- <file>
> 
> That's a rather difficult way of saying
> 
> 	git log --no-merges -p -1 <filename>
> 
> which seems much simpler. Sure, you'll get the commit message too, but 
> that just sounds like gravy to me (you can use "--pretty=oneline" or 
> something to make it denser).
> 
> 			Linus

Isn't the first one incorrect because  <file> needs to be inside the backticks?
git diff `git log -2 --pretty=format:%h <file>` -- <file>

And isn't the replacement incorrect also (the diffs are backwards)?
git log --no-merges -p -R -1 <file>

- Eric