git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG] Inconsistent output of git-show
@ 2024-11-29 19:36 Gabriel Krisman Bertazi
  2024-11-29 20:26 ` Kristoffer Haugsbakk
  0 siblings, 1 reply; 2+ messages in thread
From: Gabriel Krisman Bertazi @ 2024-11-29 19:36 UTC (permalink / raw)
  To: git

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-11-29 20:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-29 19:36 [BUG] Inconsistent output of git-show Gabriel Krisman Bertazi
2024-11-29 20:26 ` Kristoffer Haugsbakk

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).