Fixing --help, usage for *-id
PATCH 1/1 Fixing --help, usage for *-id
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.
cg-commit-id +4 -0
@@ -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#* }
cg-parent-id +4 -0
@@ -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%% *}
cg-tree-id +4 -0
@@ -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#* }
Signature · 2 lines
Regards, Pavel Roskin
Dear diary, on Mon, Sep 19, 2005 at 11:29:41PM CEST, I got a letter where Pavel Roskin <[email protected]> told me that...
Quoted 1 line
Hello!
Hello,
Quoted 3 lines
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.
Quoted 3 lines
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.
Signature · 4 lines
Petr "Pasky" Baudis Stuff: http://pasky.or.cz/ If you want the holes in your knowledge showing up try teaching someone. -- Alan Cox