From: Jonas Fonseca <fonseca@diku.dk>
To: Petr Baudis <pasky@ucw.cz>, git@vger.kernel.org
Subject: [PATCH] Misc documentation fixes and improvements
Date: Wed, 20 Jul 2005 14:05:01 +0200 [thread overview]
Message-ID: <20050720120501.GA14074@diku.dk> (raw)
Fix displaying of an error message when cg-help is called with unknown
command and use $USAGE so the correct cg-help usage string is printed.
Drop useless use of cat in print_help(). Improve the asciidoc markup.
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
---
diff --git a/cg-Xlib b/cg-Xlib
--- a/cg-Xlib
+++ b/cg-Xlib
@@ -172,7 +172,7 @@ print_help()
which "cg-$1" >/dev/null 2>&1 || exit 1
sed -n '/^USAGE=/,0s/.*"\(.*\)"/Usage: \1/p' < $(which cg-$1)
echo
- cat $(which cg-$1) | sed -n '3,/^$/s/^# *//p'
+ sed -n '3,/^$/s/^# *//p' < $(which cg-$1)
exit
}
diff --git a/cg-admin-uncommit b/cg-admin-uncommit
--- a/cg-admin-uncommit
+++ b/cg-admin-uncommit
@@ -14,14 +14,14 @@
# -t::
# This optional parameter makes `cg-admin-uncommit` to roll back
# the tree as well to the previous commit. Without this option
-# (by default) Cogito keeps the tree in its current state,
+# (by default) 'Cogito' keeps the tree in its current state,
# therefore generating tree with local changes against the target
# commit, consisting of the changes in the rolled back commits.
#
# CAVEATS
# -------
# This command can be dangerous! It is safe to do as long as you do not
-# push the commit out in the meantime, but you should NEVER uncommit an
+# push the commit out in the meantime, but you should 'NEVER' uncommit an
# already pushed out commit. Things will break for the pullers since you
# just broke the fast-forward merging mechanism (the new commit is not
# descendant of the previous one). The future push scripts will refuse
diff --git a/cg-commit b/cg-commit
--- a/cg-commit
+++ b/cg-commit
@@ -17,7 +17,7 @@
# -------
# -C::
# Make `cg-commit` ignore the cache and just commit the thing as-is.
-# Note, this is used internally by Cogito when merging. This option
+# Note, this is used internally by 'Cogito' when merging. This option
# does not make sense when files are given on the command line.
#
# -mMESSAGE::
diff --git a/cg-diff b/cg-diff
--- a/cg-diff
+++ b/cg-diff
@@ -3,7 +3,7 @@
# Make a diff between two GIT trees.
# Copyright (c) Petr Baudis, 2005
#
-# Outputs a diff for converting the first tree to the second one.
+# Outputs a diff for converting between two trees.
# By default compares the current working tree to the state at the
# last commit. The output will automatically be displayed in a pager
# unless it is piped to a program.
diff --git a/cg-help b/cg-help
--- a/cg-help
+++ b/cg-help
@@ -14,7 +14,7 @@
# OPTIONS
# -------
# -c::
-# Colorize to the output.
+# Colorize the output.
USAGE="cg-help [-c] [cg-COMMAND | COMMAND]"
_git_repo_unneeded=1
@@ -76,7 +76,8 @@ colorize() {
if [ "$ARGS" ]; then
cmd=$(echo "${ARGS[0]}" | sed 's/^cg-//')
- ( print_help $cmd | colorize ) && exit
+ print_help $cmd | colorize
+ [ "${PIPESTATUS[0]}" -eq 0 ] && exit
echo "cg-help: no help available for command \"${ARGS[0]}\""
echo "Call cg-help without any arguments for the list of available commands"
exit 1
@@ -90,7 +91,7 @@ ADVANCED_COMMANDS="$(ls $bin_path/cg-adm
colorize <<__END__
The Cogito version control system $(cg-version)
-Usage: cg-COMMAND [ARG]...
+Usage: $USAGE
Available commands:
$(print_command_listing $REGULAR_COMMANDS)
diff --git a/cg-log b/cg-log
--- a/cg-log
+++ b/cg-log
@@ -14,7 +14,7 @@
# cg-log then displays only changes in those files.
#
# -c::
-# Colorize to the output. The used colors are listed below together
+# Colorize the output. The used colors are listed below together
# with information about which log output (summary, full or both)
# they apply to:
# - `author`: 'cyan' (both)
--
Jonas Fonseca
next reply other threads:[~2005-07-20 12:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-20 12:05 Jonas Fonseca [this message]
2005-07-20 17:12 ` [PATCH] Misc documentation fixes and improvements Petr Baudis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050720120501.GA14074@diku.dk \
--to=fonseca@diku.dk \
--cc=git@vger.kernel.org \
--cc=pasky@ucw.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.