git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [q] git-diff --reverse 7def2be1..7def2be1^
@ 2008-06-20  8:20 Ingo Molnar
  2008-06-20  8:38 ` Junio C Hamano
                   ` (3 more replies)
  0 siblings, 4 replies; 25+ messages in thread
From: Ingo Molnar @ 2008-06-20  8:20 UTC (permalink / raw)
  To: git


A couple of stupid Git questions (using git-1.5.4.3-2.fc8).

Sometimes i want to see the reverse diff of a particular commit.

If i want to see the normal diff i do:

   git-log -1 -p 7def2be1

But generating the reverse diff does not work:

   git-log --reverse -1 -p 7def2be1

Because the '--reverse' here is the ordering of the revlist, not the 
direction of the patch itself. And that's OK, albeit slightly 
unintuitive.

So instead i do:

   git-diff --reverse 7def2be1..7def2be1^

I've got two observations / potential suggestions:

1) the SHA1 is duplicated above, is there a way to avoid it? Initially i 
   tried the obvious extension:

      git-diff --reverse 7def2be1..^

   But Git didnt recognize that as a valid commit range.

2) is there a way to pass something like --reversediff to git-log?

   [ time passes as i read the manpage - the final thing i do when
     every other measure fails ;-) ]

   Ah, there's "git-log -R" that would achieve this. 

   The situation still feels a tiny bit inconsistent to me, and that's 
   why my attempt to figure it out intuitively based on my existing 
   practices failed:

    a) -R is not recognized by git-diff (so i cannot just standardize 
       myself on -R and have to waste neurons on remembering the 
       distinction ;-)

    b) --reverse has different meaning in git-log and git-diff.

Perhaps one solution would be if -R was recognized by git-diff as the 
meaning of --reverse is an ABI. The extension to the sha1 range 
specifier would be nice as well, it feels intuitive to me.

Hm?

	Ingo

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2008-07-07  4:02 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-20  8:20 [q] git-diff --reverse 7def2be1..7def2be1^ Ingo Molnar
2008-06-20  8:38 ` Junio C Hamano
2008-06-20  8:46   ` Junio C Hamano
2008-06-20 10:00     ` Ingo Molnar
2008-06-20 10:02   ` Ingo Molnar
2008-06-20 10:05 ` Jakub Narebski
2008-06-20 13:02   ` Mikael Magnusson
2008-06-20 13:13     ` Jakub Narebski
2008-06-20 13:52   ` Ingo Molnar
2008-06-22 18:52     ` Andreas Ericsson
2008-07-06 16:16   ` Dmitry Potapov
2008-07-06 20:04     ` Junio C Hamano
2008-07-06 20:39       ` Dmitry Potapov
2008-07-06 22:33         ` Junio C Hamano
2008-07-07  4:01           ` Dmitry Potapov
2008-06-20 11:30 ` Matthieu Moy
2008-06-20 13:50   ` Ingo Molnar
2008-06-20 14:23     ` Jakub Narebski
     [not found]       ` <20080620153819.GF17373@elte.hu>
2008-06-20 15:38         ` Ingo Molnar
2008-06-26  9:37       ` Ingo Molnar
2008-06-26 11:02         ` Jakub Narebski
2008-06-26 11:08           ` Ingo Molnar
2008-06-26 13:50           ` Nicolas Pitre
2008-06-28 22:08         ` Junio C Hamano
2008-06-20 13:04 ` Mikael Magnusson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).