git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Feb 22, 2017, 17:18 UTC
Message-ID
<CAADWXX_S8RWE7pSZ-2JM_JeNT7LfHFgEopt6SUUUQYx0yumojw@mail.gmail.com>
In-Reply-To
<20170217040522.jugt4uuak74l3qjw@sigill.intra.peff.net>
On Thu, Feb 16, 2017 at 8:05 PM, Jeff King <peff@peff.net> wrote:
Show 6 quoted lines
> 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
Previous: Jeff King
Message 3 of 3 in “`git show --oneline commit` does not do what's intuitively expected”
  1. Luna KidFeb 17, 2017
  2. Jeff KingFeb 17, 2017
  3. Linus TorvaldsFeb 22, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.