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

Re: Git branch outputs usage message on stderr

From
KHKristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com>
Date
Jan 15, 2025, 17:39 UTC
Message-ID
<0cf0b268-c691-4fed-a58b-ea9f77eab295@app.fastmail.com>
In-Reply-To
<xmqq34hkyoys.fsf@gitster.g>
On Wed, Jan 15, 2025, at 18:19, Junio C Hamano wrote:
Show 6 quoted lines
> "Kristoffer Haugsbakk" <kristofferhaugsbakk@fastmail.com> writes:
>> [snip]
>
> Being consistent is a good idea, and I wanted to first gauge which
> way we should unify.  It seems that those who spit their help text
> into their standard error stream are indeed in minority?
Yes: 40 of those stderr `-h` outputs.
Versus 102 that use stdout.[1]
Trying a random command with usage-on-error:
    $ git-upload-pack >/dev/null
    usage: [snip]
Does give usage on stderr.
† 1:
    git add
    git annotate
    git apply
    git archive
    git bisect
    git blame
    git bugreport
    git bundle
    git cat-file
    git check-attr
    git check-ignore
    git check-mailmap
    git checkout
    git cherry
    git cherry-pick
    git clean
    git clone
    git column
    git commit-graph
    git config
    git count-objects
    git credential-cache
    git credential-cache--daemon
    git credential-store
    git describe
    git diagnose
    git difftool
    git fast-export
    git fetch
    git fmt-merge-msg
    git for-each-ref
    git for-each-repo
    git format-patch
    git fsck
    git fsck
    git grep
    git hash-object
    git help
    git hook
    git init
    git init
    git interpret-trailers
    git log
    git ls-remote
    git ls-tree
    git mailinfo
    git maintenance
    git merge-base
    git merge-file
    git merge-tree
    git mktag
    git mktree
    git multi-pack-index
    git mv
    git name-rev
    git notes
    git pack-objects
    git pack-refs
    git patch-id
    git blame
    git prune
    git prune-packed
    git pull
    git push
    git range-diff
    git read-tree
    git receive-pack
    git reflog
    git refs
    git remote
    git repack
    git replace
    git replay
    git rerere
    git reset
    git restore
    git revert
    git rm
    git send-pack
    git shortlog
    git log
    git show-branch
    git show-index
    git show-ref
    git sparse-checkout
    git add
    git stash
    git stripspace
    git submodule--helper
    git switch
    git symbolic-ref
    git tag
    git update-ref
    git update-server-info
    git-upload-pack
    git verify-commit
    git verify-pack
    git verify-tag
    git version
    git log
    git worktree
    git write-tree
Previous: Junio C HamanoNext: Junio C Hamano
Message 26 of 27 in “Git branch outputs usage message on stderr”
  1. Jonas KonradJan 15, 2025
  2. Matěj CeplJan 15, 2025
  3. Jonas KonradJan 15, 2025
  4. Junio C HamanoJan 15, 2025
  5. Kristoffer HaugsbakkJan 15, 2025
  6. Jeff KingJan 15, 2025
  7. Junio C HamanoJan 15, 2025
  8. Junio C HamanoJan 15, 2025
  9. Jeff KingJan 15, 2025
  10. Junio C HamanoJan 15, 2025
  11. Jeff KingJan 15, 2025
  12. Junio C HamanoJan 15, 2025
  13. Jeff KingJan 15, 2025
  14. Junio C HamanoJan 15, 2025
  15. Junio C HamanoJan 16, 2025
  16. Jeff KingJan 16, 2025
  17. Junio C HamanoJan 15, 2025
  18. Jeff KingJan 15, 2025
  19. Junio C HamanoJan 15, 2025
  20. Junio C HamanoJan 15, 2025
  21. Kristoffer HaugsbakkJan 15, 2025
  22. Junio C HamanoJan 15, 2025
  23. Jonas KonradJan 15, 2025
  24. Kristoffer HaugsbakkJan 15, 2025
  25. Junio C HamanoJan 15, 2025
  26. Kristoffer HaugsbakkJan 15, 2025
  27. Junio C HamanoJan 15, 2025

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.