From: Junio C Hamano Date: Fri, 20 Jun 2008 08:46:57 GMT Subject: Re: [q] git-diff --reverse 7def2be1..7def2be1^ Message-ID: <7v3an8o5mm.fsf@gitster.siamese.dyndns.org> In-Reply-To: <7v7icko61g.fsf@gitster.siamese.dyndns.org> Junio C Hamano writes: > Ingo Molnar 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!