{"thread":{"id":"1865","subject":"[PATCH] Fixing --help, usage for *-id","startedAt":"2005-09-19T21:29:41Z","lastAt":"2005-09-19T21:40:54Z","messageCount":2,"participants":["Pavel Roskin","Petr Baudis"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"8904","messageId":"1127165381.26772.16.camel@dv","threadId":"1865","inReplyTo":null,"subject":"[PATCH] Fixing --help, usage for *-id","fromName":"Pavel Roskin","fromEmail":"proski@gnu.org","sentAt":"2005-09-19T21:29:41Z","receivedAt":"2005-09-19T21:29:41Z","isPatch":true,"sender":{"key":"proski@gnu.org","avatar":null},"body":"Hello!\n\nRemoval of cg-Xlib inclusion in *-id scripts broke \"--help\" switch.\nWhen cg-Xlib is sourced indirectly through cg-Xnormid, the help text is\ntreated like an ID, and its last word is dropped.\n\nLack of USAGE string in the *-id scripts breaks the documentation\ngeneration because empty synopsis causes invalid XML.  Thus the USAGE\nstrings should be provided.\n\nSigned-off-by: Pavel Roskin <proski@gnu.org>\n\ndiff --git a/cg-commit-id b/cg-commit-id\n--- a/cg-commit-id\n+++ b/cg-commit-id\n@@ -5,6 +5,10 @@\n #\n # Takes the appropriate ID, defaults to HEAD.\n \n+USAGE=\"cg-commit-id\"\n+\n+. ${COGITO_LIB}cg-Xlib\n+\n id=\"$1\"\n normid=$(. ${COGITO_LIB}cg-Xnormid \"$id\") || exit 1\n type=${normid#* }\ndiff --git a/cg-parent-id b/cg-parent-id\n--- a/cg-parent-id\n+++ b/cg-parent-id\n@@ -7,5 +7,9 @@\n #\n # NOTE: Will return multiple SHA1s if ID is a commit with multiple parents.\n \n+USAGE=\"cg-parent-id\"\n+\n+. ${COGITO_LIB}cg-Xlib\n+\n normid=$(. ${COGITO_LIB}cg-Xnormid \"$1\"^)\n echo ${normid%% *}\ndiff --git a/cg-tree-id b/cg-tree-id\n--- a/cg-tree-id\n+++ b/cg-tree-id\n@@ -5,6 +5,10 @@\n #\n # Takes ID of the appropriate commit, defaults to HEAD.\n \n+USAGE=\"cg-tree-id\"\n+\n+. ${COGITO_LIB}cg-Xlib\n+\n id=\"$1\"\n normid=$(. ${COGITO_LIB}cg-Xnormid \"$id\") || exit 1\n type=${normid#* }\n\n\n-- \nRegards,\nPavel Roskin\n"},{"id":"8907","messageId":"20050919214054.GF18320@pasky.or.cz","threadId":"1865","inReplyTo":"1127165381.26772.16.camel@dv","subject":"Re: [PATCH] Fixing --help, usage for *-id","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2005-09-19T21:40:54Z","receivedAt":"2005-09-19T21:40:54Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Mon, Sep 19, 2005 at 11:29:41PM CEST, I got a letter\nwhere Pavel Roskin <proski@gnu.org> told me that...\n> Hello!\n\nHello,\n\n> Removal of cg-Xlib inclusion in *-id scripts broke \"--help\" switch.\n> When cg-Xlib is sourced indirectly through cg-Xnormid, the help text is\n> treated like an ID, and its last word is dropped.\n\ndo we really need --help in *-id? They are some kind of scripts\nhalf-internal and half for the user - their _primary_ use is from the\nother scripts, but they are standalone since they can be useful for the\nend user as well in various situations. I can roughly remember cg-Xlib\ninclusion in those scripts being significantly visible on the running\ntimes of the users.\n\n> Lack of USAGE string in the *-id scripts breaks the documentation\n> generation because empty synopsis causes invalid XML.  Thus the USAGE\n> strings should be provided.\n\nThanks, this was already taken care of by Martin Atukunda.\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nIf you want the holes in your knowledge showing up try teaching\nsomeone.  -- Alan Cox\n"}]}