git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: git@vger.kernel.org
Subject: Re: [q] git-diff --reverse 7def2be1..7def2be1^
Date: Fri, 20 Jun 2008 01:46:57 -0700	[thread overview]
Message-ID: <7v3an8o5mm.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <7v7icko61g.fsf@gitster.siamese.dyndns.org> (Junio C. Hamano's message of "Fri, 20 Jun 2008 01:38:03 -0700")

Junio C Hamano <gitster@pobox.com> writes:

> Ingo Molnar <mingo@elte.hu> writes:
>
>>     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 ;-)
>
> Huh?  Have you actually tried "git diff -R"?  My copy of git 1.0.0 knows
> about it.  What year are you still in ;-)?
>
> If you apply the output of
>
> 	git diff -R HEAD^..HEAD
>
> to your tree, you can revert the tip commit.  It is the same as
>
> 	git diff HEAD..HEAD^
>
> If you want to write a forward diff in an obscure way, you could say
>
> 	git diff -R HEAD..HEAD^

By the way, not linking --reverse (traverse the history normally and then
show the commits in the reverse order than usual) to -R (show diff in the
opposite way while showing the change each commit introduces) allows you
to even say "log --reverse -R", which did not come from a conscious
design, but being able to say this _is_ a conscious design:

	$ git fetch j6t
	$ git log --reverse -p ..j6t/for-junio

When I review a branch somebody else offers me, I may want to view the
commits on them in reverse order (so that they build a bit by bit on top
of my tree), but I _certainly_ do not want to view the patch in reverse!

  reply	other threads:[~2008-06-20  8:48 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

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=7v3an8o5mm.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).