* [PATCH] Fixing --help, usage for *-id
@ 2005-09-19 21:29 Pavel Roskin
2005-09-19 21:40 ` Petr Baudis
0 siblings, 1 reply; 2+ messages in thread
From: Pavel Roskin @ 2005-09-19 21:29 UTC (permalink / raw
To: Petr Baudis, git
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Fixing --help, usage for *-id
2005-09-19 21:29 [PATCH] Fixing --help, usage for *-id Pavel Roskin
@ 2005-09-19 21:40 ` Petr Baudis
0 siblings, 0 replies; 2+ messages in thread
From: Petr Baudis @ 2005-09-19 21:40 UTC (permalink / raw
To: Pavel Roskin; +Cc: git
Dear diary, on Mon, Sep 19, 2005 at 11:29:41PM CEST, I got a letter
where Pavel Roskin <proski@gnu.org> told me that...
> Hello!
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.
do we really need --help in *-id? They are some kind of scripts
half-internal and half for the user - their _primary_ use is from the
other scripts, but they are standalone since they can be useful for the
end user as well in various situations. I can roughly remember cg-Xlib
inclusion in those scripts being significantly visible on the running
times of the users.
> 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.
Thanks, this was already taken care of by Martin Atukunda.
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
If you want the holes in your knowledge showing up try teaching
someone. -- Alan Cox
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-09-19 21:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-19 21:29 [PATCH] Fixing --help, usage for *-id Pavel Roskin
2005-09-19 21:40 ` Petr Baudis
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).