Re: `git show --oneline commit` does not do what's intuitively expected

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

 



On Thu, Feb 16, 2017 at 8:05 PM, Jeff King <peff@xxxxxxxx> wrote:
> On Fri, Feb 17, 2017 at 02:51:36AM +0100, Luna Kid wrote:
>
>> tl;dr; --> Please add --no-diff (or --msg-only) to git show. We'll
>> love you for that. :)
>
> I think it is already spelled "--no-patch", or "-s" for short.

I think people should also learn about "--no-walk" (or the numberic
walk limiters) to the revision walking logic, because it can often be
useful.

IOW, if you only want the commit info, you can certainly use "git show
-s", but you can also use

    git log --no-walk .. list of commits ..

or

    git log -1 <single-commit>

to show a commit without any other details.

Basically, "git show" for a commit does what is mostly equivalent to

     git log --cc --no-walk

although "git show" then has other features too (ie it shows non-commits etc).

                Linus



[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]