{"thread":{"id":"2794","subject":"[PATCH 4/25] git-cherry: Print the usage message if we get an unknown option.","startedAt":"2005-12-10T19:37:56Z","lastAt":"2005-12-11T11:16:00Z","messageCount":34,"participants":["freku045@student.liu.se","A Large Angry SCM","Johannes Schindelin","Junio C Hamano","Nikolai Weibull"],"isPatch":true,"patchVersion":1,"patchTotal":25},"messages":[{"id":"13437","messageId":"11342434762339-git-send-email-freku045@student.liu.se","threadId":"2794","inReplyTo":"1134243476675-git-send-email-freku045@student.liu.se","subject":"[PATCH 1/25] git-bisect: Use $0 instead of program name in usage message.","fromName":"","fromEmail":"freku045@student.liu.se","sentAt":"2005-12-10T19:37:56Z","receivedAt":"2005-12-10T19:37:56Z","isPatch":true,"sender":{"key":"frekui@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13770967?v=4"},"body":"Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>\n\n---\n\n git-bisect.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\nfdaaf0b14e5df17cbeef9e89ff85f33e3dcaa4d6\ndiff --git a/git-bisect.sh b/git-bisect.sh\nindex 05dae8a..6ec35ab 100755\n--- a/git-bisect.sh\n+++ b/git-bisect.sh\n@@ -12,7 +12,7 @@ sq() {\n }\n \n usage() {\n-    echo >&2 'usage: git bisect [start|bad|good|next|reset|visualize]\n+    echo >&2 'usage: $0 [start|bad|good|next|reset|visualize]\n git bisect start [<pathspec>]\treset bisect state and start bisection.\n git bisect bad [<rev>]\t\tmark <rev> a known-bad revision.\n git bisect good [<rev>...]\tmark <rev>... known-good revisions.\n-- \n0.99.9.GIT\n"},{"id":"13461","messageId":"1134243476675-git-send-email-freku045@student.liu.se","threadId":"2794","inReplyTo":null,"subject":"[PATCH 0/25] Usage message clean-up","fromName":"","fromEmail":"freku045@student.liu.se","sentAt":"2005-12-10T19:37:56Z","receivedAt":"2005-12-10T19:37:56Z","isPatch":true,"sender":{"key":"frekui@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13770967?v=4"},"body":"This patch series is supposed to clean-up usage strings in *.sh and\n*.perl. I have gone through most of the scripts, but have left the\nfollowing programs for various reasons.\n\nNo obvious fix:\n  git-log.sh\n  git-parse-remote.sh\n  git-rebase.sh\n\nStill todo:\n  git-archimport.perl\n  git-cvsexportcommit.perl\n  git-cvsimport.perl\n  git-svnimport.perl\n  git-applymbox.sh\n  git-applypatch.sh\n  git-fmt-merge-msg.perl\n  cmd-rename.sh\n  git-ls-remote.sh\n  git-merge-octopus.sh\n  git-merge-one-file.sh\n  git-merge-ours.sh\n  git-merge-resolve.sh\n  git-merge-stupid.sh\n  git-octopus.sh\n  git-parse-remote.sh\n\n\n\nI have tried to follow the following rules:\n\n* Any unrecognised options should make the script die with the usage\n  message.\n* -h and --help makes the script die with the usage message.\n* The message is printed to stderr.\n* The message is of the form \"usage: $0 options\"\n\nI am not convinced that the last bullet point is the best way to do\nthings. Using \"$0\" is probably best for Git developers but using \"git\nprogram-name\" is probably least confusing for users, especially if we\nare going to move the git-* binaries away from /usr/bin. Another\noption is \"basename $0\". What do you think?\n\n--\n\n Documentation/git-revert.txt |    2 +\n git-bisect.sh                |    2 +\n git-branch.sh                |    2 +\n git-checkout.sh              |    2 +\n git-cherry.sh                |   18 ++++++++++--\n git-clone.sh                 |    2 +\n git-commit.sh                |    2 +\n git-count-objects.sh         |   11 +++++++\n git-fetch.sh                 |    8 +++++\n git-format-patch.sh          |    3 +-\n git-grep.sh                  |   11 ++++++-\n git-lost-found.sh            |   12 +++++++-\n git-merge.sh                 |    2 +\n git-mv.perl                  |   10 ++++++-\n git-prune.sh                 |    2 +\n git-pull.sh                  |    3 +-\n git-push.sh                  |    2 +\n git-relink.perl              |   10 +++----\n git-repack.sh                |    7 ++++-\n git-request-pull.sh          |    6 ++--\n git-reset.sh                 |    2 +\n git-revert.sh                |    4 +--\n git-send-email.perl          |   62 +++++++++++++++++++++++-------------------\n git-status.sh                |   12 +++++++-\n git-tag.sh                   |   10 +------\n git-verify-tag.sh            |   10 +++----\n 26 files changed, 142 insertions(+), 75 deletions(-)\n\n- Fredrik\n"},{"id":"13435","messageId":"11342434771080-git-send-email-freku045@student.liu.se","threadId":"2794","inReplyTo":"1134243476675-git-send-email-freku045@student.liu.se","subject":"[PATCH 4/25] git-cherry: Print the usage message if we get an unknown option.","fromName":"","fromEmail":"freku045@student.liu.se","sentAt":"2005-12-10T19:37:57Z","receivedAt":"2005-12-10T19:37:57Z","isPatch":true,"sender":{"key":"frekui@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13770967?v=4"},"body":"Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>\n\n---\n\n git-cherry.sh |   18 +++++++++++++++---\n 1 files changed, 15 insertions(+), 3 deletions(-)\n\n10b829123619b4b3c398398726c830db87f7525a\ndiff --git a/git-cherry.sh b/git-cherry.sh\nindex 867522b..c21cf65 100755\n--- a/git-cherry.sh\n+++ b/git-cherry.sh\n@@ -5,7 +5,8 @@\n \n . git-sh-setup\n \n-usage=\"usage: $0 \"'[-v] <upstream> [<head>]\n+usage () {\n+    die \"usage: $0 \"'[-v] <upstream> [<head>]\n \n              __*__*__*__*__> <upstream>\n             /\n@@ -18,8 +19,19 @@ compared against the change each commit \n it is shown on the standard output with prefix \"+\".  Otherwise\n it is shown with prefix \"-\".\n '\n+}\n \n-case \"$1\" in -v) verbose=t; shift ;; esac \n+while [ \"$#\" != \"0\" ]; do\n+    case \"$1\" in\n+        \"-v\")\n+            verbose=t;\n+            shift\n+            ;;\n+        -*)\n+            usage\n+            ;;\n+    esac\n+done\n \n case \"$#,$1\" in\n 1,*..*)\n@@ -35,7 +47,7 @@ case \"$#\" in\n 2) upstream=`git-rev-parse --verify \"$1\"` &&\n    ours=`git-rev-parse --verify \"$2\"` || exit\n    ;;\n-*) echo >&2 \"$usage\"; exit 1 ;;\n+*) usage ;;\n esac\n \n # Note that these list commits in reverse order;\n-- \n0.99.9.GIT\n"},{"id":"13436","messageId":"1134243477755-git-send-email-freku045@student.liu.se","threadId":"2794","inReplyTo":"1134243476675-git-send-email-freku045@student.liu.se","subject":"[PATCH 2/25] git-branch: Use $0 instead of program name in usage message.","fromName":"","fromEmail":"freku045@student.liu.se","sentAt":"2005-12-10T19:37:57Z","receivedAt":"2005-12-10T19:37:57Z","isPatch":true,"sender":{"key":"frekui@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13770967?v=4"},"body":"Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>\n\n---\n\n git-branch.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\n57d5239afe20cda3f902d2deab4cd3777f82eca6\ndiff --git a/git-branch.sh b/git-branch.sh\nindex 5306b27..90a1b5b 100755\n--- a/git-branch.sh\n+++ b/git-branch.sh\n@@ -8,7 +8,7 @@ die () {\n }\n \n usage () {\n-    echo >&2 \"usage: $(basename $0)\"' [-d <branch>] | [[-f] <branch> [start-point]]\n+    echo >&2 \"usage: $0\"' [-d <branch>] | [[-f] <branch> [start-point]]\n \n If no arguments, show available branches and mark current branch with a star.\n If one argument, create a new branch <branchname> based off of current HEAD.\n-- \n0.99.9.GIT\n"},{"id":"13438","messageId":"11342434771367-git-send-email-freku045@student.liu.se","threadId":"2794","inReplyTo":"1134243476675-git-send-email-freku045@student.liu.se","subject":"[PATCH 3/25] git-checkout: Use $0 instead of program name in usage message.","fromName":"","fromEmail":"freku045@student.liu.se","sentAt":"2005-12-10T19:37:57Z","receivedAt":"2005-12-10T19:37:57Z","isPatch":true,"sender":{"key":"frekui@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13770967?v=4"},"body":"Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>\n\n---\n\n git-checkout.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\n480ea8310be08611c841ae428c57003ac48c1827\ndiff --git a/git-checkout.sh b/git-checkout.sh\nindex 4cf30e2..2fcd766 100755\n--- a/git-checkout.sh\n+++ b/git-checkout.sh\n@@ -2,7 +2,7 @@\n . git-sh-setup\n \n usage () {\n-    die \"usage: git checkout [-f] [-b <new_branch>] [<branch>] [<paths>...]\"\n+    die \"usage: $0 [-f] [-b <new_branch>] [<branch>] [<paths>...]\"\n }\n \n old=$(git-rev-parse HEAD)\n-- \n0.99.9.GIT\n"},{"id":"13439","messageId":"11342434773441-git-send-email-freku045@student.liu.se","threadId":"2794","inReplyTo":"1134243476675-git-send-email-freku045@student.liu.se","subject":"[PATCH 9/25] git-format-patch: Use the 'die'-function where appropriate.","fromName":"","fromEmail":"freku045@student.liu.se","sentAt":"2005-12-10T19:37:57Z","receivedAt":"2005-12-10T19:37:57Z","isPatch":true,"sender":{"key":"frekui@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13770967?v=4"},"body":"Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>\n\n---\n\n git-format-patch.sh |    3 +--\n 1 files changed, 1 insertions(+), 2 deletions(-)\n\n78267845f0e0d20f23448692bf3ff967faf5fea7\ndiff --git a/git-format-patch.sh b/git-format-patch.sh\nindex 1eebe85..4ecbf49 100755\n--- a/git-format-patch.sh\n+++ b/git-format-patch.sh\n@@ -10,7 +10,7 @@ LANG=C LC_ALL=C\n export LANG LC_ALL\n \n usage () {\n-    echo >&2 \"usage: $0\"' [-n] [-o dir | --stdout] [--keep-subject] [--mbox]\n+    die \"usage: $0\"' [-n] [-o dir | --stdout] [--keep-subject] [--mbox]\n     [--check] [--signoff] [-<diff options>...]\n     [--help]\n     ( from..to ... | upstream [ our-head ] )\n@@ -30,7 +30,6 @@ When --mbox is specified, the output is \n UNIX mailbox format, and can be concatenated together for processing\n with applymbox.\n '\n-    exit 1\n }\n \n diff_opts=\n-- \n0.99.9.GIT\n"},{"id":"13440","messageId":"11342434773071-git-send-email-freku045@student.liu.se","threadId":"2794","inReplyTo":"1134243476675-git-send-email-freku045@student.liu.se","subject":"[PATCH 6/25] git-commit: Use $0 instead of program name in usage message.","fromName":"","fromEmail":"freku045@student.liu.se","sentAt":"2005-12-10T19:37:57Z","receivedAt":"2005-12-10T19:37:57Z","isPatch":true,"sender":{"key":"frekui@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13770967?v=4"},"body":"Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>\n\n---\n\n git-commit.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\n2b859132aeae56504c0d7aaa99436dce9dac2117\ndiff --git a/git-commit.sh b/git-commit.sh\nindex 3d250ec..1893f98 100755\n--- a/git-commit.sh\n+++ b/git-commit.sh\n@@ -6,7 +6,7 @@\n . git-sh-setup\n \n usage () {\n-\tdie 'git commit [-a] [-s] [-v | --no-verify]  [-m <message> | -F <logfile> | (-C|-c) <commit>] [-e] [<path>...]'\n+\tdie \"usage: $0 [-a] [-s] [-v | --no-verify]  [-m <message> | -F <logfile> | (-C|-c) <commit>] [-e] [<path>...]\"\n }\n \n all= logfile= use_commit= no_edit= log_given= log_message= verify=t signoff=\n-- \n0.99.9.GIT\n"},{"id":"13442","messageId":"11342434771528-git-send-email-freku045@student.liu.se","threadId":"2794","inReplyTo":"1134243476675-git-send-email-freku045@student.liu.se","subject":"[PATCH 5/25] git-clone: Use $0 instead of program name in usage message.","fromName":"","fromEmail":"freku045@student.liu.se","sentAt":"2005-12-10T19:37:57Z","receivedAt":"2005-12-10T19:37:57Z","isPatch":true,"sender":{"key":"frekui@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13770967?v=4"},"body":"Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>\n\n---\n\n git-clone.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\n028cbc161562fae23c9797564c8d50da6c082941\ndiff --git a/git-clone.sh b/git-clone.sh\nindex 699205e..d07e4d9 100755\n--- a/git-clone.sh\n+++ b/git-clone.sh\n@@ -9,7 +9,7 @@\n unset CDPATH\n \n usage() {\n-\techo >&2 \"* git clone [-l [-s]] [-q] [-u <upload-pack>] [-n] <repo> [<dir>]\"\n+\techo >&2 \"usage: $0 [-l [-s]] [-q] [-u <upload-pack>] [-n] <repo> [<dir>]\"\n \texit 1\n }\n \n-- \n0.99.9.GIT\n"},{"id":"13450","messageId":"11342434772549-git-send-email-freku045@student.liu.se","threadId":"2794","inReplyTo":"1134243476675-git-send-email-freku045@student.liu.se","subject":"[PATCH 7/25] git-count-objects: Die with usage message if we are invoked incorrectly.","fromName":"","fromEmail":"freku045@student.liu.se","sentAt":"2005-12-10T19:37:57Z","receivedAt":"2005-12-10T19:37:57Z","isPatch":true,"sender":{"key":"frekui@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13770967?v=4"},"body":"Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>\n\n---\n\n git-count-objects.sh |   11 ++++++++++-\n 1 files changed, 10 insertions(+), 1 deletions(-)\n\n5db708396a841860c4d5e41c2acd60476d2207c4\ndiff --git a/git-count-objects.sh b/git-count-objects.sh\nindex 40c58ef..0d544ad 100755\n--- a/git-count-objects.sh\n+++ b/git-count-objects.sh\n@@ -3,7 +3,16 @@\n # Copyright (c) 2005 Junio C Hamano\n #\n \n-GIT_DIR=`git-rev-parse --git-dir` || exit $?\n+. git-sh-setup\n+\n+usage () {\n+    die \"usage: $0\"\n+}\n+\n+if [ \"$#\" != \"0\" ]\n+then\n+    usage\n+fi\n \n dc </dev/null 2>/dev/null || {\n \t# This is not a real DC at all -- it just knows how\n-- \n0.99.9.GIT\n"},{"id":"13452","messageId":"11342434773816-git-send-email-freku045@student.liu.se","threadId":"2794","inReplyTo":"1134243476675-git-send-email-freku045@student.liu.se","subject":"[PATCH 8/25] git-fetch: Print usage message if we get an unrecognized option.","fromName":"","fromEmail":"freku045@student.liu.se","sentAt":"2005-12-10T19:37:57Z","receivedAt":"2005-12-10T19:37:57Z","isPatch":true,"sender":{"key":"frekui@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13770967?v=4"},"body":"Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>\n\n---\n\n git-fetch.sh |    8 ++++++++\n 1 files changed, 8 insertions(+), 0 deletions(-)\n\n50d509080e5cf32880bf412133473557f9e5f5b2\ndiff --git a/git-fetch.sh b/git-fetch.sh\nindex 14ea295..18b421d 100755\n--- a/git-fetch.sh\n+++ b/git-fetch.sh\n@@ -2,6 +2,11 @@\n #\n . git-sh-setup\n . git-parse-remote\n+\n+usage () {\n+    die \"usage: $0 <fetch-options> <repository> <refspec>...\"\n+}\n+\n _x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'\n _x40=\"$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40\"\n \n@@ -34,6 +39,9 @@ do\n \t-v|--verbose)\n \t\tverbose=Yes\n \t\t;;\n+        -*)\n+                usage\n+                ;;\n \t*)\n \t\tbreak\n \t\t;;\n-- \n0.99.9.GIT\n"},{"id":"13447","messageId":"11342434783113-git-send-email-freku045@student.liu.se","threadId":"2794","inReplyTo":"1134243476675-git-send-email-freku045@student.liu.se","subject":"[PATCH 10/25] git-grep: Print usage message on '-h' and '--help'.","fromName":"","fromEmail":"freku045@student.liu.se","sentAt":"2005-12-10T19:37:58Z","receivedAt":"2005-12-10T19:37:58Z","isPatch":true,"sender":{"key":"frekui@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13770967?v=4"},"body":"Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>\n\n---\n\n git-grep.sh |   11 +++++++++--\n 1 files changed, 9 insertions(+), 2 deletions(-)\n\nb375c3ad7c6ce4d6cda208c61828f8ff72cb7d53\ndiff --git a/git-grep.sh b/git-grep.sh\nindex 44c1613..e6acc41 100755\n--- a/git-grep.sh\n+++ b/git-grep.sh\n@@ -3,6 +3,11 @@\n # Copyright (c) Linus Torvalds, 2005\n #\n \n+usage () {\n+        echo >&2 \"usage: $0 <option>... <pattern> [pathspec*]\"\n+        exit 1\n+}\n+\n pattern=\n flags=()\n git_flags=()\n@@ -26,6 +31,9 @@ while : ; do\n \t\tshift\n \t\tbreak\n \t\t;;\n+        -h|--h|--he|--hel|--help)\n+                usage\n+                ;;\n \t-*)\n \t\tflags=(\"${flags[@]}\" \"$1\")\n \t\t;;\n@@ -40,8 +48,7 @@ while : ; do\n \tshift\n done\n [ \"$pattern\" ] || {\n-\techo >&2 \"usage: 'git grep <pattern> [pathspec*]'\"\n-\texit 1\n+        usage\n }\n git-ls-files -z \"${git_flags[@]}\" \"$@\" |\n \txargs -0 grep \"${flags[@]}\" -e \"$pattern\"\n-- \n0.99.9.GIT\n"},{"id":"13448","messageId":"11342434781941-git-send-email-freku045@student.liu.se","threadId":"2794","inReplyTo":"1134243476675-git-send-email-freku045@student.liu.se","subject":"[PATCH 16/25] git-push: Clean up usage message","fromName":"","fromEmail":"freku045@student.liu.se","sentAt":"2005-12-10T19:37:58Z","receivedAt":"2005-12-10T19:37:58Z","isPatch":true,"sender":{"key":"frekui@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13770967?v=4"},"body":"Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>\n\n---\n\n git-push.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\n81b8c434e68712e5309af3d573cf13ebcb911a6f\ndiff --git a/git-push.sh b/git-push.sh\nindex 140c8f8..3336312 100755\n--- a/git-push.sh\n+++ b/git-push.sh\n@@ -2,7 +2,7 @@\n . git-sh-setup\n \n usage () {\n-    die \"Usage: git push [--all] [--force] <repository> [<refspec>]\"\n+    die \"usage: git push [--all] [--force] <repository> [<refspec>...]\"\n }\n \n \n-- \n0.99.9.GIT\n"},{"id":"13449","messageId":"11342434783018-git-send-email-freku045@student.liu.se","threadId":"2794","inReplyTo":"1134243476675-git-send-email-freku045@student.liu.se","subject":"[PATCH 15/25] git-pull: Don't print an extra new line at the end of the usage message.","fromName":"","fromEmail":"freku045@student.liu.se","sentAt":"2005-12-10T19:37:58Z","receivedAt":"2005-12-10T19:37:58Z","isPatch":true,"sender":{"key":"frekui@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13770967?v=4"},"body":"Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>\n\n---\n\n git-pull.sh |    3 +--\n 1 files changed, 1 insertions(+), 2 deletions(-)\n\n6123ce84502e443c10c6689966aa51c821775a1a\ndiff --git a/git-pull.sh b/git-pull.sh\nindex 3a13984..5a1ae2c 100755\n--- a/git-pull.sh\n+++ b/git-pull.sh\n@@ -12,8 +12,7 @@ usage () {\n     [<fetch-options>]\n     <repo> <head>...\n \n-Fetch one or more remote refs and merge it/them into the current HEAD.\n-'\n+Fetch one or more remote refs and merge it/them into the current HEAD.'\n     exit 1\n }\n \n-- \n0.99.9.GIT\n"},{"id":"13453","messageId":"11342434782697-git-send-email-freku045@student.liu.se","threadId":"2794","inReplyTo":"1134243476675-git-send-email-freku045@student.liu.se","subject":"[PATCH 13/25] git-merge: Print $0 instead of program name in usage message.","fromName":"","fromEmail":"freku045@student.liu.se","sentAt":"2005-12-10T19:37:58Z","receivedAt":"2005-12-10T19:37:58Z","isPatch":true,"sender":{"key":"frekui@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13770967?v=4"},"body":"Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>\n\n---\n\n git-merge.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\nea22e6b3b15294ae1c6f367b109ee3f969b115c8\ndiff --git a/git-merge.sh b/git-merge.sh\nindex a221daa..f7aca19 100755\n--- a/git-merge.sh\n+++ b/git-merge.sh\n@@ -9,7 +9,7 @@ LF='\n '\n \n usage () {\n-    die \"git-merge [-n] [--no-commit] [-s <strategy>]... <merge-message> <head> <remote>+\"\n+    die \"usage: $0 [-n] [--no-commit] [-s <strategy>]... <merge-message> <head> <remote>+\"\n }\n \n all_strategies='recursive octopus resolve stupid ours'\n-- \n0.99.9.GIT\n"},{"id":"13454","messageId":"11342434781220-git-send-email-freku045@student.liu.se","threadId":"2794","inReplyTo":"1134243476675-git-send-email-freku045@student.liu.se","subject":"[PATCH 16/25] git-push: Clean-up usage message","fromName":"","fromEmail":"freku045@student.liu.se","sentAt":"2005-12-10T19:37:58Z","receivedAt":"2005-12-10T19:37:58Z","isPatch":true,"sender":{"key":"frekui@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13770967?v=4"},"body":"Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>\n\n---\n\n git-push.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\n81b8c434e68712e5309af3d573cf13ebcb911a6f\ndiff --git a/git-push.sh b/git-push.sh\nindex 140c8f8..3336312 100755\n--- a/git-push.sh\n+++ b/git-push.sh\n@@ -2,7 +2,7 @@\n . git-sh-setup\n \n usage () {\n-    die \"Usage: git push [--all] [--force] <repository> [<refspec>]\"\n+    die \"usage: $0 [--all] [--force] <repository> [<refspec>...]\"\n }\n \n \n-- \n0.99.9.GIT\n"},{"id":"13455","messageId":"1134243478674-git-send-email-freku045@student.liu.se","threadId":"2794","inReplyTo":"1134243476675-git-send-email-freku045@student.liu.se","subject":"[PATCH 14/25] git-prune: Print $0 instead of program name in usage message.","fromName":"","fromEmail":"freku045@student.liu.se","sentAt":"2005-12-10T19:37:58Z","receivedAt":"2005-12-10T19:37:58Z","isPatch":true,"sender":{"key":"frekui@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13770967?v=4"},"body":"Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>\n\n---\n\n git-prune.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\n9c6661f08f42a6a1c76e43749d6e455bd1237dcb\ndiff --git a/git-prune.sh b/git-prune.sh\nindex 7e7f0ad..289aca0 100755\n--- a/git-prune.sh\n+++ b/git-prune.sh\n@@ -9,7 +9,7 @@ do\n     case \"$1\" in\n     -n) dryrun=-n echo=echo ;;\n     --) break ;;\n-    -*) echo >&2 \"usage: git-prune [ -n ] [ heads... ]\"; exit 1 ;;\n+    -*) echo >&2 \"usage: $0 [-n] [--] [<head>...]\"; exit 1 ;;\n     *)  break ;;\n     esac\n     shift;\n-- \n0.99.9.GIT\n"},{"id":"13457","messageId":"11342434781344-git-send-email-freku045@student.liu.se","threadId":"2794","inReplyTo":"1134243476675-git-send-email-freku045@student.liu.se","subject":"[PATCH 11/25] git-revert: Fix usage message","fromName":"","fromEmail":"freku045@student.liu.se","sentAt":"2005-12-10T19:37:58Z","receivedAt":"2005-12-10T19:37:58Z","isPatch":true,"sender":{"key":"frekui@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13770967?v=4"},"body":"Also syncs the usage message in the documentation with the usage message in\nthe implementation.\n\nSigned-off-by: Fredrik Kuivinen <freku045@student.liu.se>\n\n---\n\n Documentation/git-revert.txt |    2 +-\n git-revert.sh                |    4 ++--\n 2 files changed, 3 insertions(+), 3 deletions(-)\n\n3fbfe1e03eba7db1e484b7d00ac77820e6a11907\ndiff --git a/Documentation/git-revert.txt b/Documentation/git-revert.txt\nindex e27c680..6684a60 100644\n--- a/Documentation/git-revert.txt\n+++ b/Documentation/git-revert.txt\n@@ -7,7 +7,7 @@ git-revert - Revert an existing commit.\n \n SYNOPSIS\n --------\n-'git-revert' [--edit | --no-edit] [-n] <commit>\n+'git-revert' [--edit | --no-edit] [-n | --no-commit] <commit>\n \n DESCRIPTION\n -----------\ndiff --git a/git-revert.sh b/git-revert.sh\nindex 9d499c4..0a94344 100755\n--- a/git-revert.sh\n+++ b/git-revert.sh\n@@ -19,10 +19,10 @@ esac\n usage () {\n \tcase \"$me\" in\n \tcherry-pick)\n-\t\tdie \"usage git $me [--edit] [-n] [-r] <commit-ish>\"\n+\t\tdie \"usage: $0 [--edit] [-n | --no-commit] [-r] <commit>\"\n \t\t;;\n \trevert)\n-\t\tdie \"usage git $me [--edit | --no-edit] [-n] <commit-ish>\"\n+\t\tdie \"usage $0 [--edit | --no-edit] [-n | --no-commit] <commit>\"\n \t\t;;\n \tesac\n }\n-- \n0.99.9.GIT\n"},{"id":"13458","messageId":"11342434782774-git-send-email-freku045@student.liu.se","threadId":"2794","inReplyTo":"1134243476675-git-send-email-freku045@student.liu.se","subject":"[PATCH 12/25] git-lost-found: Print usage message on incorrect invocation.","fromName":"","fromEmail":"freku045@student.liu.se","sentAt":"2005-12-10T19:37:58Z","receivedAt":"2005-12-10T19:37:58Z","isPatch":true,"sender":{"key":"frekui@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13770967?v=4"},"body":"Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>\n\n---\n\n git-lost-found.sh |   12 +++++++++++-\n 1 files changed, 11 insertions(+), 1 deletions(-)\n\n2b2c389a8816f40cfa5b562203988b0c0b2269c5\ndiff --git a/git-lost-found.sh b/git-lost-found.sh\nindex 2beec2a..757e51f 100755\n--- a/git-lost-found.sh\n+++ b/git-lost-found.sh\n@@ -1,6 +1,16 @@\n #!/bin/sh\n \n-GIT_DIR=`git-rev-parse --git-dir` || exit $?\n+. git-sh-setup\n+\n+usage () {\n+\tdie \"usage: $0\"\n+}\n+\n+if [ \"$#\" != \"0\" ]\n+then\n+    usage\n+fi\n+\n laf=\"$GIT_DIR/lost-found\"\n rm -fr \"$laf\" && mkdir -p \"$laf/commit\" \"$laf/other\" || exit\n \n-- \n0.99.9.GIT\n"},{"id":"13441","messageId":"11342434792502-git-send-email-freku045@student.liu.se","threadId":"2794","inReplyTo":"1134243476675-git-send-email-freku045@student.liu.se","subject":"[PATCH 19/25] git-request-pull: Print usage message to stderr.","fromName":"","fromEmail":"freku045@student.liu.se","sentAt":"2005-12-10T19:37:59Z","receivedAt":"2005-12-10T19:37:59Z","isPatch":true,"sender":{"key":"frekui@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13770967?v=4"},"body":"Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>\n\n---\n\n git-request-pull.sh |    6 +++---\n 1 files changed, 3 insertions(+), 3 deletions(-)\n\n342b45c20724b86b1b12c3f588d6aff12c1ceb11\ndiff --git a/git-request-pull.sh b/git-request-pull.sh\nindex ae6cd27..e199a91 100755\n--- a/git-request-pull.sh\n+++ b/git-request-pull.sh\n@@ -6,9 +6,9 @@\n \n usage()\n {\n-\techo \"$0 <commit> <url> [ <head> ]\"\n-\techo \"  Summarizes the changes since <commit> to the standard output,\"\n-\techo \"  and includes <url> in the message generated.\"\n+\techo >&2 \"usage: $0 <commit> <url> [<head>]\"\n+\techo >&2 '  Summarizes the changes since <commit> to the standard output,'\n+\techo >&2 '  and includes <url> in the message generated.'\n \texit 1\n }\n \n-- \n0.99.9.GIT\n"},{"id":"13443","messageId":"11342434791103-git-send-email-freku045@student.liu.se","threadId":"2794","inReplyTo":"1134243476675-git-send-email-freku045@student.liu.se","subject":"[PATCH 20/25] git-reset: Use $0 instead of program name in usage message.","fromName":"","fromEmail":"freku045@student.liu.se","sentAt":"2005-12-10T19:37:59Z","receivedAt":"2005-12-10T19:37:59Z","isPatch":true,"sender":{"key":"frekui@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13770967?v=4"},"body":"Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>\n\n---\n\n git-reset.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\n33cc93a9e686c0daa64e430bf44b441809fd1025\ndiff --git a/git-reset.sh b/git-reset.sh\nindex 72ef303..58600fc 100755\n--- a/git-reset.sh\n+++ b/git-reset.sh\n@@ -2,7 +2,7 @@\n . git-sh-setup\n \n usage () {\n-\tdie 'Usage: git reset [--mixed | --soft | --hard]  [<commit-ish>]'\n+\tdie 'usage: $0 [--mixed | --soft | --hard]  [<commit-ish>]'\n }\n \n tmp=/var/tmp/reset.$$\n-- \n0.99.9.GIT\n"},{"id":"13444","messageId":"11342434794009-git-send-email-freku045@student.liu.se","threadId":"2794","inReplyTo":"1134243476675-git-send-email-freku045@student.liu.se","subject":"[PATCH 17/25] git-relink: Print usage message to stderr.","fromName":"","fromEmail":"freku045@student.liu.se","sentAt":"2005-12-10T19:37:59Z","receivedAt":"2005-12-10T19:37:59Z","isPatch":true,"sender":{"key":"frekui@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13770967?v=4"},"body":"Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>\n\n---\n\n git-relink.perl |   10 +++++-----\n 1 files changed, 5 insertions(+), 5 deletions(-)\n\nc8f3a2016fcd16470507af70bf4de17de3881f6f\ndiff --git a/git-relink.perl b/git-relink.perl\nindex f6b4f6a..816e238 100755\n--- a/git-relink.perl\n+++ b/git-relink.perl\n@@ -163,11 +163,11 @@ sub link_two_files($$) {\n \n \n sub usage() {\n-\tprint(\"Usage: $0 [--safe] <dir> [<dir> ...] <master_dir> \\n\");\n-\tprint(\"All directories should contain a .git/objects/ subdirectory.\\n\");\n-\tprint(\"Options\\n\");\n-\tprint(\"\\t--safe\\t\" .\n+\tprint STDERR \"usage: $0 [--safe] <dir> [<dir>...] <master_dir>\\n\";\n+\tprint STDERR \"All directories should contain a .git/objects/ subdirectory.\\n\";\n+\tprint STDERR \"Options\\n\";\n+\tprint STDERR \"\\t--safe\\t\" .\n \t\t\"Stops if two objects with the same hash exist but \" .\n-\t\t\"have different sizes.  Default is to warn and continue.\\n\");\n+\t\t\"have different sizes.  Default is to warn and continue.\\n\";\n \texit(1);\n }\n-- \n0.99.9.GIT\n"},{"id":"13445","messageId":"1134243479885-git-send-email-freku045@student.liu.se","threadId":"2794","inReplyTo":"1134243476675-git-send-email-freku045@student.liu.se","subject":"[PATCH 18/25] git-repack: Print usage message on unrecognized option.","fromName":"","fromEmail":"freku045@student.liu.se","sentAt":"2005-12-10T19:37:59Z","receivedAt":"2005-12-10T19:37:59Z","isPatch":true,"sender":{"key":"frekui@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13770967?v=4"},"body":"Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>\n\n---\n\n git-repack.sh |    7 ++++++-\n 1 files changed, 6 insertions(+), 1 deletions(-)\n\n3616296531a068dcbe5a39f8864ddde3b3067969\ndiff --git a/git-repack.sh b/git-repack.sh\nindex 430ddc5..9752032 100755\n--- a/git-repack.sh\n+++ b/git-repack.sh\n@@ -4,7 +4,11 @@\n #\n \n . git-sh-setup\n-\t\n+\n+usage () {\n+\tdie \"usage: $0 [-a] [-d] [-l] [-n]\"\n+}\n+\n no_update_info= all_into_one= remove_redundant= local=\n while case \"$#\" in 0) break ;; esac\n do\n@@ -13,6 +17,7 @@ do\n \t-a)\tall_into_one=t ;;\n \t-d)\tremove_redundant=t ;;\n \t-l)\tlocal=t ;;\n+\t-*)\tusage ;;\n \t*)\tbreak ;;\n \tesac\n \tshift\n-- \n0.99.9.GIT\n"},{"id":"13446","messageId":"11342434792231-git-send-email-freku045@student.liu.se","threadId":"2794","inReplyTo":"1134243476675-git-send-email-freku045@student.liu.se","subject":"[PATCH 21/25] git-send-email: Usage message clean-up.","fromName":"","fromEmail":"freku045@student.liu.se","sentAt":"2005-12-10T19:37:59Z","receivedAt":"2005-12-10T19:37:59Z","isPatch":true,"sender":{"key":"frekui@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13770967?v=4"},"body":"Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>\n\n---\n\n git-send-email.perl |   62 ++++++++++++++++++++++++++++-----------------------\n 1 files changed, 34 insertions(+), 28 deletions(-)\n\n38fde073a59d00a19111a30e8f804c4e784835e7\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex ec1428d..5f6b729 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -27,6 +27,38 @@ use Email::Valid;\n sub unique_email_list(@);\n sub cleanup_compose_files();\n \n+sub usage {\n+\tprint <<EOT;\n+$0 [options] <file | directory> [... file | directory ]\n+Options:\n+   --from         Specify the \"From:\" line of the email to be sent.\n+\n+   --to           Specify the primary \"To:\" line of the email.\n+\n+   --compose      Use \\$EDITOR to edit an introductory message for the\n+                  patch series.\n+\n+   --subject      Specify the initial \"Subject:\" line.\n+                  Only necessary if --compose is also set.  If --compose\n+\t\t  is not set, this will be prompted for.\n+\n+   --in-reply-to  Specify the first \"In-Reply-To:\" header line.\n+                  Only used if --compose is also set.  If --compose is not\n+\t\t  set, this will be prompted for.\n+\n+   --chain-reply-to If set, the replies will all be to the previous\n+                  email sent, rather than to the first email sent.\n+                  Defaults to on.\n+\n+   --smtp-server  If set, specifies the outgoing SMTP server to use.\n+                  Defaults to localhost.\n+EOT\n+\n+\tprint $_[0], \"\\n\" if defined $_[0];\n+\n+\texit(1);\n+}\n+\n # Constants (essentially)\n my $compose_filename = \".msg.$$\";\n \n@@ -51,6 +83,7 @@ my $rc = GetOptions(\"from=s\" => \\$from,\n \t\t    \"chain-reply-to!\" => \\$chain_reply_to,\n \t\t    \"smtp-server=s\" => \\$smtp_server,\n \t\t    \"compose\" => \\$compose,\n+\t\t    \"help|h\" => sub { usage; },\n \t );\n \n # Now, let's fill any that aren't set in with defaults:\n@@ -187,34 +220,7 @@ for my $f (@ARGV) {\n if (@files) {\n \tprint $_,\"\\n\" for @files;\n } else {\n-\tprint <<EOT;\n-git-send-email [options] <file | directory> [... file | directory ]\n-Options:\n-   --from         Specify the \"From:\" line of the email to be sent.\n-\n-   --to           Specify the primary \"To:\" line of the email.\n-\n-   --compose      Use \\$EDITOR to edit an introductory message for the\n-                  patch series.\n-\n-   --subject      Specify the initial \"Subject:\" line.\n-                  Only necessary if --compose is also set.  If --compose\n-\t\t  is not set, this will be prompted for.\n-\n-   --in-reply-to  Specify the first \"In-Reply-To:\" header line.\n-                  Only used if --compose is also set.  If --compose is not\n-\t\t  set, this will be prompted for.\n-\n-   --chain-reply-to If set, the replies will all be to the previous\n-                  email sent, rather than to the first email sent.\n-                  Defaults to on.\n-\n-   --smtp-server  If set, specifies the outgoing SMTP server to use.\n-                  Defaults to localhost.\n-\n-Error: Please specify a file or a directory on the command line.\n-EOT\n-\texit(1);\n+\tusage \"Error: Please specify a file or a directory on the command line.\";\n }\n \n # Variables we set as part of the loop over files\n-- \n0.99.9.GIT\n"},{"id":"13456","messageId":"11342434793108-git-send-email-freku045@student.liu.se","threadId":"2794","inReplyTo":"1134243476675-git-send-email-freku045@student.liu.se","subject":"[PATCH 23/25] git-tag: Clean-up usage message.","fromName":"","fromEmail":"freku045@student.liu.se","sentAt":"2005-12-10T19:37:59Z","receivedAt":"2005-12-10T19:37:59Z","isPatch":true,"sender":{"key":"frekui@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13770967?v=4"},"body":"Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>\n\n---\n\n git-tag.sh |   10 ++--------\n 1 files changed, 2 insertions(+), 8 deletions(-)\n\n3a3150d9fbd640ffb269fc49a322c04466e700f5\ndiff --git a/git-tag.sh b/git-tag.sh\nindex 2435a75..f4a0150 100755\n--- a/git-tag.sh\n+++ b/git-tag.sh\n@@ -1,16 +1,10 @@\n #!/bin/sh\n # Copyright (c) 2005 Linus Torvalds\n \n-GIT_DIR=`git-rev-parse --git-dir` || exit $?\n+. git-sh-setup\n \n usage () {\n-    echo >&2 \"Usage: git-tag [-a | -s | -u <key-id>] [-f | -d] [-m <msg>] <tagname> [<head>]\"\n-    exit 1\n-}\n-\n-die () {\n-    echo >&2 \"$*\"\n-    exit 1\n+    die \"usage: $0 [-a | -s | -u <key-id>] [-f | -d] [-m <msg>] <tagname> [<head>]\"\n }\n \n annotate=\n-- \n0.99.9.GIT\n"},{"id":"13459","messageId":"11342434791594-git-send-email-freku045@student.liu.se","threadId":"2794","inReplyTo":"1134243476675-git-send-email-freku045@student.liu.se","subject":"[PATCH 22/25] git-status: Print usage message on incorrect invocation.","fromName":"","fromEmail":"freku045@student.liu.se","sentAt":"2005-12-10T19:37:59Z","receivedAt":"2005-12-10T19:37:59Z","isPatch":true,"sender":{"key":"frekui@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13770967?v=4"},"body":"Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>\n\n---\n\n git-status.sh |   12 +++++++++++-\n 1 files changed, 11 insertions(+), 1 deletions(-)\n\n5bce9bb1977eea80398f894880340f10bdc9a2eb\ndiff --git a/git-status.sh b/git-status.sh\nindex 2dda0c5..4ba6cc2 100755\n--- a/git-status.sh\n+++ b/git-status.sh\n@@ -2,7 +2,17 @@\n #\n # Copyright (c) 2005 Linus Torvalds\n #\n-GIT_DIR=$(git-rev-parse --git-dir) || exit\n+\n+. git-sh-setup\n+\n+usage () {\n+\tdie \"usage: $0\"\n+}\n+\n+if [ \"$#\" != \"0\" ]\n+then\n+    usage\n+fi\n \n report () {\n   header=\"#\n-- \n0.99.9.GIT\n"},{"id":"13451","messageId":"11342434801467-git-send-email-freku045@student.liu.se","threadId":"2794","inReplyTo":"1134243476675-git-send-email-freku045@student.liu.se","subject":"[PATCH 25/25] git-mv: Clean-up usage message.","fromName":"","fromEmail":"freku045@student.liu.se","sentAt":"2005-12-10T19:38:00Z","receivedAt":"2005-12-10T19:38:00Z","isPatch":true,"sender":{"key":"frekui@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13770967?v=4"},"body":"Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>\n\n---\n\n git-mv.perl |   10 +++++++++-\n 1 files changed, 9 insertions(+), 1 deletions(-)\n\na213190dc8f25c133046a35593e027cb748f662b\ndiff --git a/git-mv.perl b/git-mv.perl\nindex 83dc7e4..db6699d 100755\n--- a/git-mv.perl\n+++ b/git-mv.perl\n@@ -12,13 +12,21 @@ use strict;\n use Getopt::Std;\n \n sub usage() {\n-\tprint <<EOT;\n+\tprint STDERR <<EOT;\n $0 [-f] [-n] <source> <destination>\n $0 [-f] [-n] [-k] <source> ... <destination directory>\n EOT\n \texit(1);\n }\n \n+sub HELP_MESSAGE() {\n+\tusage;\n+}\n+\n+sub VERSION_MESSAGE() {\n+\tusage;\n+}\n+\n my $GIT_DIR = `git rev-parse --git-dir`;\n exit 1 if $?; # rev-parse would have given \"not a git dir\" message.\n chomp($GIT_DIR);\n-- \n0.99.9.GIT\n"},{"id":"13460","messageId":"11342434801752-git-send-email-freku045@student.liu.se","threadId":"2794","inReplyTo":"1134243476675-git-send-email-freku045@student.liu.se","subject":"[PATCH 24/25] git-verify-tag: Clean-up usage message.","fromName":"","fromEmail":"freku045@student.liu.se","sentAt":"2005-12-10T19:38:00Z","receivedAt":"2005-12-10T19:38:00Z","isPatch":true,"sender":{"key":"frekui@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13770967?v=4"},"body":"Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>\n\n---\n\n git-verify-tag.sh |   10 +++++-----\n 1 files changed, 5 insertions(+), 5 deletions(-)\n\n54db71ed3add0583463d77645e840ef61c8c6d9c\ndiff --git a/git-verify-tag.sh b/git-verify-tag.sh\nindex 1f44da5..aff7c68 100755\n--- a/git-verify-tag.sh\n+++ b/git-verify-tag.sh\n@@ -1,14 +1,14 @@\n #!/bin/sh\n \n-GIT_DIR=`git-rev-parse --git-dir` || exit $?\n+. git-sh-setup\n \n-die () {\n-    echo >&2 \"$*\"\n-    exit 1\n+usage () {\n+    echo >&2 \"usage: $0 [-a | -s | -u <key-id>] [-f | -d] [-m <msg>] <tagname> [<head>]\"\n+    die \"$@\"\n }\n \n type=\"$(git-cat-file -t \"$1\" 2>/dev/null)\" ||\n-\tdie \"$1: no such object.\"\n+\tusage \"$1: no such object.\"\n \n test \"$type\" = tag ||\n \tdie \"$1: cannot verify a non-tag object of type $type.\"\n-- \n0.99.9.GIT\n"},{"id":"13462","messageId":"439B5325.8000504@gmail.com","threadId":"2794","inReplyTo":"1134243476675-git-send-email-freku045@student.liu.se","subject":"Re: [PATCH 0/25] Usage message clean-up","fromName":"A Large Angry SCM","fromEmail":"gitzilla@gmail.com","sentAt":"2005-12-10T22:13:57Z","receivedAt":"2005-12-10T22:13:57Z","isPatch":true,"sender":{"key":"gitzilla@gmail.com","avatar":"https://gravatar.com/avatar/354625c442439908ff3dd99757dee330e29e9df7847472384faf7a00add247fb?d=mp&s=160"},"body":"freku045@student.liu.se wrote:\n...\n> I have tried to follow the following rules:\n> \n> * Any unrecognised options should make the script die with the usage\n>   message.\n\nGood.\n\n> * -h and --help makes the script die with the usage message.\n\nThis should not be an error. The user was asking for the usage message.\n\n> * The message is printed to stderr.\n\nGood unless the message was printed due to -h or --help, then it should \ngo to stdout.\n\n> * The message is of the form \"usage: $0 options\"\n> \n> I am not convinced that the last bullet point is the best way to do\n> things. Using \"$0\" is probably best for Git developers but using \"git\n> program-name\" is probably least confusing for users, especially if we\n> are going to move the git-* binaries away from /usr/bin. Another\n> option is \"basename $0\". What do you think?\n\nNot using $0 can make it _extremely_ annoying to determine exactly which \nprogram printed the usage message. It may look prettier without the path \nbut if I have more that one $(basename $0) it may not be trivial to \ndetermine the one that issued the message. Also keep in mind that is it \npossible to have spaces in names of executables. So, \"foo-bar\" and \"foo \nbar\" may be two different executables.\n"},{"id":"13465","messageId":"Pine.LNX.4.63.0512102349040.3083@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"2794","inReplyTo":"1134243476675-git-send-email-freku045@student.liu.se","subject":"Re: [PATCH 0/25] Usage message clean-up","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2005-12-10T22:50:44Z","receivedAt":"2005-12-10T22:50:44Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Sat, 10 Dec 2005, freku045@student.liu.se wrote:\n\n> * Any unrecognised options should make the script die with the usage\n>   message.\n\nGood.\n\n> * -h and --help makes the script die with the usage message.\n\nGood.\n\n> * The message is printed to stderr.\n\nArguable.\n\n> * The message is of the form \"usage: $0 options\"\n\nNot good. We are in a transition to \"git whatever\" from \"git-whatever\".\n\nBesides, I have to admit that I am a bit annoyed by 25 mini mails for the \nsame purpose.\n\nHth,\nDscho\n"},{"id":"13469","messageId":"7vbqzouyor.fsf@assigned-by-dhcp.cox.net","threadId":"2794","inReplyTo":"Pine.LNX.4.63.0512102349040.3083@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: [PATCH 0/25] Usage message clean-up","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-12-11T02:58:44Z","receivedAt":"2005-12-11T02:58:44Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n>> * -h and --help makes the script die with the usage message.\n>\n> Good.\n\nSupporting -h and --help are good, but we probably do not want\nto exit with non-zero status in such a case.  Not a big deal,\nthough.\n\n>> * The message is printed to stderr.\n>\n> Arguable.\n\nOne thing I really hate is a program that does more than one\npageful of help message to stderr which forces me to do \"blah\n>&2 --help | less\", but our help messages are short and sweet,\nso I feel stderr is OK.\n\n>> * The message is of the form \"usage: $0 options\"\n>\n> Not good. We are in a transition to \"git whatever\" from \"git-whatever\".\n\nBut when the user wishes to look at the manual page, he needs to\nsay \"man git-whatever\", so either way you cannot win.  I'm\nneutral either way, as long as we are consistent.\n\n> Besides, I have to admit that I am a bit annoyed by 25 mini mails for the \n> same purpose.\n\nI'd appreciate the flexibility of reviewing them indivudually,\nespecially when some of them seem to change the structure of the\nargument parsing loop.\n"},{"id":"13471","messageId":"7v1x0kuutn.fsf@assigned-by-dhcp.cox.net","threadId":"2794","inReplyTo":"11342434772549-git-send-email-freku045@student.liu.se","subject":"Re: [PATCH 7/25] git-count-objects: Die with usage message if we are invoked incorrectly.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-12-11T04:22:12Z","receivedAt":"2005-12-11T04:22:12Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"freku045@student.liu.se writes:\n\n> 5db708396a841860c4d5e41c2acd60476d2207c4\n> diff --git a/git-count-objects.sh b/git-count-objects.sh\n> index 40c58ef..0d544ad 100755\n> --- a/git-count-objects.sh\n> +++ b/git-count-objects.sh\n> @@ -3,7 +3,16 @@\n>  # Copyright (c) 2005 Junio C Hamano\n>  #\n>  \n> -GIT_DIR=`git-rev-parse --git-dir` || exit $?\n> +. git-sh-setup\n\nNot that it matters too much, but this makes count-object not\nwork from subdirectory.\n"},{"id":"13472","messageId":"7vwtictg1f.fsf@assigned-by-dhcp.cox.net","threadId":"2794","inReplyTo":"11342434794009-git-send-email-freku045@student.liu.se","subject":"Re: [PATCH 17/25] git-relink: Print usage message to stderr.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-12-11T04:26:52Z","receivedAt":"2005-12-11T04:26:52Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"freku045@student.liu.se writes:\n\n> +\tprint STDERR \"usage: $0 [--safe] <dir> [<dir>...] <master_dir>\\n\";\n> +\tprint STDERR \"All directories should contain a .git/objects/ subdirectory.\\n\";\n> +\tprint STDERR \"Options\\n\";\n> +\tprint STDERR \"\\t--safe\\t\" .\n>  \t\t\"Stops if two objects with the same hash exist but \" .\n> -\t\t\"have different sizes.  Default is to warn and continue.\\n\");\n> +\t\t\"have different sizes.  Default is to warn and continue.\\n\";\n\nMight be cleaner to use <<HERE document here.\n"},{"id":"13473","messageId":"7vslt0tfvn.fsf@assigned-by-dhcp.cox.net","threadId":"2794","inReplyTo":"11342434792231-git-send-email-freku045@student.liu.se","subject":"Re: [PATCH 21/25] git-send-email: Usage message clean-up.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-12-11T04:30:20Z","receivedAt":"2005-12-11T04:30:20Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"freku045@student.liu.se writes:\n\n> +sub usage {\n> +\tprint <<EOT;\n> +$0 [options] <file | directory> [... file | directory ]\n\nNot going to STDERR?\n"},{"id":"13486","messageId":"20051211111600.GA5985@puritan.petwork","threadId":"2794","inReplyTo":"1134243476675-git-send-email-freku045@student.liu.se","subject":"Re: [PATCH 0/25] Usage message clean-up","fromName":"Nikolai Weibull","fromEmail":"mailing-lists.git@rawuncut.elitemail.org","sentAt":"2005-12-11T11:16:00Z","receivedAt":"2005-12-11T11:16:00Z","isPatch":true,"sender":{"key":"mailing-lists.git@rawuncut.elitemail.org","avatar":null},"body":"freku045@student.liu.se wrote:\n\n> * The message is of the form \"usage: $0 options\"\n\nI don’t really care, but most GNU utils seem to use a large 'U' in\n\"Usage\".  Is there a particular reason that git doesn't?  (Other than\ngit not being GNU software?)\n\n        nikolai\n\n-- \nNikolai Weibull: now available free of charge at http://bitwi.se/!\nBorn in Chicago, IL USA; currently residing in Gothenburg, Sweden.\nmain(){printf(&linux[\"\\021%six\\012\\0\"],(linux)[\"have\"]+\"fun\"-97);}\n"}]}