Re: [q] git-diff --reverse 7def2be1..7def2be1^

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> Ingo Molnar <mingo@xxxxxxx> 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!
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux