How to show diff for a rev?
John Meinel
john at arbash-meinel.com
Thu Jun 19 13:40:50 UTC 2014
According to the "man git-show" which only has an off-hand reference to -m:
Note also that you can give the `-m’ option to any of these commands to
force generation of diffs with individual parents of a merge.
That makes it sound like it shows *both* diffs. The diff of the merge
revision vs parent0 *and* the diff of the merge revision vs parent1.
John
=:->
On Thu, Jun 19, 2014 at 2:13 AM, Menno Smits <menno.smits at canonical.com>
wrote:
> 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/f4d70fcb/attachment.html>
More information about the Juju-dev
mailing list