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

[PATCH 2/3] git-log: Add usage string

From
Fredrik Kuivinen <freku045@student.liu.se>
Date
Dec 15, 2005, 22:48 UTC
Message-ID
<20051215224826.GD14388@c165.ib.student.liu.se>
In-Reply-To
<20051215224350.GB14388@c165.ib.student.liu.se>
Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>
---
 git-log.sh |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
381a6c62ad8e735de6122127c7684e8a14f41676
diff --git a/git-log.sh b/git-log.sh
index b36c4e9..c2ea71c 100755
--- a/git-log.sh
+++ b/git-log.sh
@@ -3,13 +3,13 @@
 # Copyright (c) 2005 Linus Torvalds
 #
 
-# This one uses only subdirectory-aware commands, so no need to
-# include sh-setup-script.
+USAGE='[--max-count=<n>] [<since>..<limit>] [--pretty=<format>] [git-rev-list options]'
+SUBDIRECTORY_OK='Yes'
+. git-sh-setup
 
 revs=$(git-rev-parse --revs-only --no-flags --default HEAD "$@") || exit
 [ "$revs" ] || {
-	echo >&2 "No HEAD ref"
-	exit 1
+	die "No HEAD ref"
 }
 git-rev-list --pretty $(git-rev-parse --default HEAD "$@") |
 LESS=-S ${PAGER:-less}
-- 
0.99.9.GIT
Previous: Fredrik KuivinenNext: Fredrik Kuivinen
Message 3 of 4 in “Usage string clean-up (diff, log and whatchanged)”
  1. 0/3 Usage string clean-up (diff, log and whatchanged)Fredrik Kuivinen, Dec 15, 2005
  2. 1/3 git-diff: Usage string clean-upFredrik Kuivinen, Dec 15, 2005
  3. 2/3 git-log: Add usage stringFredrik Kuivinen, Dec 15, 2005
  4. 3/3 git-whatchanged: Add usage stringFredrik Kuivinen, Dec 15, 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.