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

[PATCH 0/11] Usage string clean-up

From
freku045@student.liu.se <freku045@student.liu.se>
Date
Dec 13, 2005, 22:30 UTC
Message-ID
<11345130302438-git-send-email-freku045@student.liu.se>
Hi,

This is a redone version of the usage string clean-up patch series. It should apply cleanly on top of the current 'pu' branch.

This version is supposed to get the details right.

The scripts are supposed to set the variable USAGE to some suitable value before they source git-sh-setup. Optionally they can also set LONG_USAGE to a more descriptive help message.

* --help makes the scripts print the (long) usage string and exit
  cleanly.
* Unrecognized options prints the usage string and exits non-cleanly.
* The printed string is of the form "Usage: $0 options". The "Usage:
  $0 " part can easily be changed by changing git-sh-setup.sh

The real value of this series is that all commands prints a usage message when they get '--help'.

I have left *.perl for a later patch.
 git-add.sh           |   13 +++----------
 git-am.sh            |   10 +++-------
 git-applymbox.sh     |    6 +-----
 git-applypatch.sh    |    4 ++++
 git-checkout.sh      |    6 ++----
 git-cherry.sh        |   13 +++++--------
 git-clone.sh         |    2 +-
 git-commit.sh        |    5 +----
 git-count-objects.sh |    4 +++-
 git-fetch.sh         |    5 +++++
 git-format-patch.sh  |   25 ++++++++-----------------
 git-grep.sh          |    7 +++++--
 git-lost-found.sh    |   10 +++++++++-
 git-merge.sh         |    6 ++----
 git-prune.sh         |    3 ++-
 git-pull.sh          |   13 ++-----------
 git-push.sh          |    7 ++-----
 git-rebase.sh        |    5 +++--
 git-repack.sh        |    2 ++
 git-request-pull.sh  |   12 +++++-------
 git-reset.sh         |    6 ++----
 git-resolve.sh       |    6 ++----
 git-revert.sh        |   19 +++++--------------
 git-tag.sh           |   14 +++-----------
 git-verify-tag.sh    |   14 ++++++++------
 25 files changed, 88 insertions(+), 129 deletions(-)
- Fredrik
Next: freku045@student.liu.se
Message 1 of 17 in “Usage string clean-up”
  1. 0/11 Usage string clean-upfreku045@student.liu.se, Dec 13, 2005
  2. 8/11 git-lost-found: Usage string clean-up, emit usage string at incorrect invocationfreku045@student.liu.se, Dec 13, 2005
  3. 4/11 git-am: Usage string clean-upfreku045@student.liu.se, Dec 13, 2005
  4. 3/11 git-revert: Usage string clean-upfreku045@student.liu.se, Dec 13, 2005
  5. 2/11 git-verify-tag: Usage string clean-up, emit usage string at incorrect invocationfreku045@student.liu.se, Dec 13, 2005
  6. 1/11 Trivial usage string clean-upfreku045@student.liu.se, Dec 13, 2005
  7. 5/11 git-applypatch: Usage string clean-up, emit usage string at incorrect invocationfreku045@student.liu.se, Dec 13, 2005
  8. Junio C HamanoDec 14, 2005
  9. Timo HirvonenDec 14, 2005
  10. Fredrik KuivinenDec 15, 2005
  11. Marco CostalbaDec 15, 2005
  12. Junio C HamanoDec 15, 2005
  13. 7/11 git-fetch: Usage string clean-up, emit usage string at unrecognized optionfreku045@student.liu.se, Dec 13, 2005
  14. 6/11 git-cherry: Usage string clean-up, use the 'usage' functionfreku045@student.liu.se, Dec 13, 2005
  15. 9/11 git-prune: Usage string clean-up, use the 'usage' functionfreku045@student.liu.se, Dec 13, 2005
  16. 11/11 git-repack: Usage string clean-up, emit usage at incorrect invocationfreku045@student.liu.se, Dec 13, 2005
  17. 10/11 git-rebase: Usage string clean-up, emit usage string at incorrect invocationfreku045@student.liu.se, Dec 13, 2005

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.