git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: Petr Baudis <pasky@suse.cz>, git <git@vger.kernel.org>
Subject: [PATCH] Fixing --help, usage for *-id
Date: Mon, 19 Sep 2005 17:29:41 -0400	[thread overview]
Message-ID: <1127165381.26772.16.camel@dv> (raw)

Hello!

Removal of cg-Xlib inclusion in *-id scripts broke "--help" switch.
When cg-Xlib is sourced indirectly through cg-Xnormid, the help text is
treated like an ID, and its last word is dropped.

Lack of USAGE string in the *-id scripts breaks the documentation
generation because empty synopsis causes invalid XML.  Thus the USAGE
strings should be provided.

Signed-off-by: Pavel Roskin <proski@gnu.org>

diff --git a/cg-commit-id b/cg-commit-id
--- a/cg-commit-id
+++ b/cg-commit-id
@@ -5,6 +5,10 @@
 #
 # Takes the appropriate ID, defaults to HEAD.
 
+USAGE="cg-commit-id"
+
+. ${COGITO_LIB}cg-Xlib
+
 id="$1"
 normid=$(. ${COGITO_LIB}cg-Xnormid "$id") || exit 1
 type=${normid#* }
diff --git a/cg-parent-id b/cg-parent-id
--- a/cg-parent-id
+++ b/cg-parent-id
@@ -7,5 +7,9 @@
 #
 # NOTE: Will return multiple SHA1s if ID is a commit with multiple parents.
 
+USAGE="cg-parent-id"
+
+. ${COGITO_LIB}cg-Xlib
+
 normid=$(. ${COGITO_LIB}cg-Xnormid "$1"^)
 echo ${normid%% *}
diff --git a/cg-tree-id b/cg-tree-id
--- a/cg-tree-id
+++ b/cg-tree-id
@@ -5,6 +5,10 @@
 #
 # Takes ID of the appropriate commit, defaults to HEAD.
 
+USAGE="cg-tree-id"
+
+. ${COGITO_LIB}cg-Xlib
+
 id="$1"
 normid=$(. ${COGITO_LIB}cg-Xnormid "$id") || exit 1
 type=${normid#* }


-- 
Regards,
Pavel Roskin

             reply	other threads:[~2005-09-19 21:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-19 21:29 Pavel Roskin [this message]
2005-09-19 21:40 ` [PATCH] Fixing --help, usage for *-id 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=1127165381.26772.16.camel@dv \
    --to=proski@gnu.org \
    --cc=git@vger.kernel.org \
    --cc=pasky@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).