public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Eric Raible <raible@gmail•com>
To: git@vger•kernel.org
Subject: Re: Does CVS has a easy way to compare file with its previous version?
Date: Thu, 2 Jul 2009 18:04:45 +0000 (UTC)	[thread overview]
Message-ID: <loom.20090702T174843-784@post.gmane.org> (raw)
In-Reply-To: alpine.LFD.2.01.0906301813480.3605@localhost.localdomain

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

  reply	other threads:[~2009-07-02 18:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-30  7:41 Does CVS has a easy way to compare file with its previous version? dtletmn
2009-06-30 11:32 ` Andreas Ericsson
2009-06-30 12:36 ` Jakub Narebski
2009-06-30 23:28   ` Paolo Bonzini
2009-07-01  1:18     ` Linus Torvalds
2009-07-02 18:04       ` Eric Raible [this message]
2009-07-03  6:39         ` Paolo Bonzini
2009-07-06 23:39           ` Eric Raible
2009-07-07 19:57             ` Paolo Bonzini
2009-07-01  0:29 ` dtletmn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20090702T174843-784@post.gmane.org \
    --to=raible@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox