Trivial usage string clean-up
Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
freku045@student.liu.se committed
Dec 13, 2005 at 23:30 UTC
806f36d4d7caf75b6d3e098cb0353d85d3477c7d
14 files changed
+39
-89
git-add.sh
+3
-10
@@ -1,13 +1,8 @@
1
#!/bin/sh
2
3
-die () {
4
- echo >&2 "$*"
5
- exit 1
6
-}
7
-
8
-usage() {
9
- die "usage: git add [-n] [-v] <file>..."
10
-}
3
+USAGE='[-n] [-v] <file>...'
4
+SUBDIRECTORY_OK='Yes'
5
+. git-sh-setup
6
7
show_only=
8
verbose=
@@ -29,8 +24,6 @@ while : ; do
24
shift
25
done
26
32
-GIT_DIR=$(git-rev-parse --git-dir) || exit
33
-
27
if test -f "$GIT_DIR/info/exclude"
28
then
29
git-ls-files -z \
git-applymbox.sh
+1
-5
@@ -18,13 +18,9 @@
18
##
19
## git-am is supposed to be the newer and better tool for this job.
20
21
+USAGE='[-u] [-k] [-q] [-m] (-c .dotest/<num> | mbox) [signoff]'
22
. git-sh-setup
23
23
-usage () {
24
- echo >&2 "applymbox [-u] [-k] [-q] [-m] (-c .dotest/<num> | mbox) [signoff]"
25
- exit 1
26
-}
27
-
24
keep_subject= query_apply= continue= utf8= resume=t
25
while case "$#" in 0) break ;; esac
26
do
git-checkout.sh
+2
-4
@@ -1,9 +1,7 @@
1
#!/bin/sh
2
-. git-sh-setup
2
4
-usage () {
5
- die "usage: git checkout [-f] [-b <new_branch>] [<branch>] [<paths>...]"
6
-}
3
+USAGE='[-f] [-b <new_branch>] [<branch>] [<paths>...]'
4
+. git-sh-setup
5
6
old=$(git-rev-parse HEAD)
7
new=
git-clone.sh
+1
-1
@@ -9,7 +9,7 @@
9
unset CDPATH
10
11
usage() {
12
- echo >&2 "* git clone [-l [-s]] [-q] [-u <upload-pack>] [-n] <repo> [<dir>]"
12
+ echo >&2 "Usage: $0 [-l [-s]] [-q] [-u <upload-pack>] [-n] <repo> [<dir>]"
13
exit 1
14
}
15
git-commit.sh
+1
-4
@@ -3,12 +3,9 @@
3
# Copyright (c) 2005 Linus Torvalds
4
#
5
6
+USAGE='[-a] [-s] [-v | --no-verify] [-m <message> | -F <logfile> | (-C|-c) <commit>] [-e] [<path>...]'
7
. git-sh-setup
8
8
-usage () {
9
- die 'git commit [-a] [-s] [-v | --no-verify] [-m <message> | -F <logfile> | (-C|-c) <commit>] [-e] [<path>...]'
10
-}
11
-
9
all= logfile= use_commit= no_edit= log_given= log_message= verify=t signoff=
10
while case "$#" in 0) break;; esac
11
do
git-format-patch.sh
+8
-17
@@ -3,19 +3,8 @@
3
# Copyright (c) 2005 Junio C Hamano
4
#
5
6
-. git-sh-setup
7
-
8
-# Force diff to run in C locale.
9
-LANG=C LC_ALL=C
10
-export LANG LC_ALL
11
-
12
-usage () {
13
- echo >&2 "usage: $0"' [-n] [-o dir | --stdout] [--keep-subject] [--mbox]
14
- [--check] [--signoff] [-<diff options>...]
15
- [--help]
16
- ( from..to ... | upstream [ our-head ] )
17
-
18
-Prepare each commit with its patch since our-head forked from upstream,
6
+USAGE='[-n | -k] [-o <dir> | --stdout] [--signoff] [--check] [--mbox] [--diff-options] <upstream> [<our-head>]'
7
+LONG_USAGE='Prepare each commit with its patch since our-head forked from upstream,
8
one file per patch, for e-mail submission. Each output file is
9
numbered sequentially from 1, and uses the first line of the commit
10
message (massaged for pathname safety) as the filename.
@@ -28,10 +17,12 @@ as "[PATCH N/M] Subject", unless you have only one patch.
17
18
When --mbox is specified, the output is formatted to resemble
19
UNIX mailbox format, and can be concatenated together for processing
31
-with applymbox.
32
-'
33
- exit 1
34
-}
20
+with applymbox.'
21
+. git-sh-setup
22
+
23
+# Force diff to run in C locale.
24
+LANG=C LC_ALL=C
25
+export LANG LC_ALL
26
27
diff_opts=
28
LF='
git-grep.sh
+5
-2
@@ -3,6 +3,10 @@
3
# Copyright (c) Linus Torvalds, 2005
4
#
5
6
+USAGE='<option>... <pattern> <path>...'
7
+SUBDIRECTORY_OK='Yes'
8
+. git-sh-setup
9
+
10
pattern=
11
flags=()
12
git_flags=()
@@ -40,8 +44,7 @@ while : ; do
44
shift
45
done
46
[ "$pattern" ] || {
43
- echo >&2 "usage: 'git grep <pattern> [pathspec*]'"
44
- exit 1
47
+ usage
48
}
49
git-ls-files -z "${git_flags[@]}" "$@" |
50
xargs -0 grep "${flags[@]}" -e "$pattern"
git-merge.sh
+2
-4
@@ -3,15 +3,13 @@
3
# Copyright (c) 2005 Junio C Hamano
4
#
5
6
+
7
+USAGE='[-n] [--no-commit] [-s <strategy>]... <merge-message> <head> <remote>+'
8
. git-sh-setup
9
10
LF='
11
'
12
11
-usage () {
12
- die "git-merge [-n] [--no-commit] [-s <strategy>]... <merge-message> <head> <remote>+"
13
-}
14
-
13
all_strategies='recursive octopus resolve stupid ours'
14
default_strategies='recursive'
15
use_strategies=
git-pull.sh
+2
-11
@@ -4,19 +4,10 @@
4
#
5
# Fetch one or more remote refs and merge it/them into the current HEAD.
6
7
+USAGE='[-n | --no-summary] [--no-commit] [-s strategy]... [<fetch-options>] <repo> <head>...'
8
+LONG_USAGE='Fetch one or more remote refs and merge it/them into the current HEAD.'
9
. git-sh-setup
10
9
-usage () {
10
- echo >&2 "usage: $0"' [-n] [--no-commit] [--no-summary] [--help]
11
- [-s strategy]...
12
- [<fetch-options>]
13
- <repo> <head>...
14
-
15
-Fetch one or more remote refs and merge it/them into the current HEAD.
16
-'
17
- exit 1
18
-}
19
-
11
strategy_args= no_summary= no_commit=
12
while case "$#,$1" in 0) break ;; *,-*) ;; *) break ;; esac
13
do
git-push.sh
+2
-5
@@ -1,10 +1,7 @@
1
#!/bin/sh
2
-. git-sh-setup
3
-
4
-usage () {
5
- die "Usage: git push [--all] [--force] <repository> [<refspec>]"
6
-}
2
3
+USAGE='[--all] [--force] <repository> [<refspec>...]'
4
+. git-sh-setup
5
6
# Parse out parameters and then stop at remote, so that we can
7
# translate it using .git/branches information
git-request-pull.sh
+5
-7
@@ -4,13 +4,11 @@
4
# This file is licensed under the GPL v2, or a later version
5
# at the discretion of Linus Torvalds.
6
7
-usage()
8
-{
9
- echo "$0 <commit> <url> [ <head> ]"
10
- echo " Summarizes the changes since <commit> to the standard output,"
11
- echo " and includes <url> in the message generated."
12
- exit 1
13
-}
7
+USAGE='<commit> <url> [<head>]'
8
+LONG_USAGE='Summarizes the changes since <commit> to the standard output,
9
+and includes <url> in the message generated.'
10
+SUBDIRECTORY_OK='Yes'
11
+. git-sh-setup
12
13
revision=$1
14
url=$2
git-reset.sh
+2
-4
@@ -1,9 +1,7 @@
1
#!/bin/sh
2
-. git-sh-setup
2
4
-usage () {
5
- die 'Usage: git reset [--mixed | --soft | --hard] [<commit-ish>]'
6
-}
3
+USAGE='[--mixed | --soft | --hard] [<commit-ish>]'
4
+. git-sh-setup
5
6
tmp=/var/tmp/reset.$$
7
trap 'rm -f $tmp-*' 0 1 2 3 15
git-resolve.sh
+2
-4
@@ -4,11 +4,9 @@
4
#
5
# Resolve two trees.
6
#
7
-. git-sh-setup
7
9
-usage () {
10
- die "git-resolve <head> <remote> <merge-message>"
11
-}
8
+USAGE='<head> <remote> <merge-message>'
9
+. git-sh-setup
10
11
dropheads() {
12
rm -f -- "$GIT_DIR/MERGE_HEAD" \
git-tag.sh
+3
-11
@@ -1,17 +1,9 @@
1
#!/bin/sh
2
# Copyright (c) 2005 Linus Torvalds
3
4
-GIT_DIR=`git-rev-parse --git-dir` || exit $?
5
-
6
-usage () {
7
- echo >&2 "Usage: git-tag [-a | -s | -u <key-id>] [-f | -d] [-m <msg>] <tagname> [<head>]"
8
- exit 1
9
-}
10
-
11
-die () {
12
- echo >&2 "$*"
13
- exit 1
14
-}
4
+USAGE='[-a | -s | -u <key-id>] [-f | -d] [-m <msg>] <tagname> [<head>]'
5
+SUBDIRECTORY_OK='Yes'
6
+. git-sh-setup
7
8
annotate=
9
signed=