git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gabriel Krisman Bertazi <krisman@suse.de>
To: git@vger.kernel.org
Subject: [BUG] Inconsistent output of git-show
Date: Fri, 29 Nov 2024 14:36:07 -0500	[thread overview]
Message-ID: <87jzclal3s.fsf@mailhost.krisman.be> (raw)

Hi,

1.  git show --oneline --no-patch
7af08b57bcb9 (HEAD, origin/master, linus/master) Merge tag 'trace-v6.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace

2.  git show --oneline --no-patch | cat
7af08b57bcb9 Merge tag 'trace-v6.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace

(--oneline doesn't matter here. Just making the output concise)

The branch information in parenthesis vanished just because of the shell
redirection.  That makes quickly writing shell one-liners very annoying.
Sure, I can go figure a proper git invocation to get me that
information. But we're all hardwired to use basic shell commands, and
sometimes all I need is a quick grep and not learn a program-specific
way of filtering.

So, could we make the output consistent regardless of redirection,
i.e. What You See Is What You Pipe?  Whoever requires a specific format
for a script should be the ones using --format.

I've got v2.47.0 and I admit to not have tested later versions.

Thanks,

-- 
Gabriel Krisman Bertazi

             reply	other threads:[~2024-11-29 19:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-29 19:36 Gabriel Krisman Bertazi [this message]
2024-11-29 20:26 ` [BUG] Inconsistent output of git-show Kristoffer Haugsbakk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87jzclal3s.fsf@mailhost.krisman.be \
    --to=krisman@suse.de \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).