How to show diff for a rev?
Menno Smits
menno.smits at canonical.com
Wed Jun 18 22:13:05 UTC 2014
Try the poorly documented -m option to git show, like this:
git show -m <rev>
For 7360086, this gives exactly the same output as git
diff 7360086^ 7360086.
For 348c104, the output is almost the same as "git diff 348c104^ 348c104"
except there's some additional hunks at the bottom which I haven't spent
much time figuring out where they're from. The additional bits certainly
look related to the change.
On 18 June 2014 23:37, Martin Packman <martin.packman at canonical.com> wrote:
> On 18/06/2014, John Meinel <john at arbash-meinel.com> wrote:
> >
> > So the only syntax that reliably gives me what I want is:
> > git dif 348c104^ 348c104
> > I was hoping there would be a better shortcut for it. Does anyone have
> some
> > more voodoo that I could use to avoid having to type the same thing
> twice?
>
> That's what I've always done. Often have shas (or sha heads) on my
> clipboard...
>
> Seems like you could do something like this though:
>
> $ git config --global alias.d '!sh -c "git diff $1^ $1" -'
> $ git d 348c104
>
> Martin
>
> --
> Juju-dev mailing list
> Juju-dev at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju-dev/attachments/20140619/a97ba537/attachment.html>
More information about the Juju-dev
mailing list