{"thread":{"id":"1276","subject":"[PATCH] Misc documentation fixes and improvements","startedAt":"2005-07-20T12:05:01Z","lastAt":"2005-07-20T17:12:22Z","messageCount":2,"participants":["Jonas Fonseca","Petr Baudis"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"6278","messageId":"20050720120501.GA14074@diku.dk","threadId":"1276","inReplyTo":null,"subject":"[PATCH] Misc documentation fixes and improvements","fromName":"Jonas Fonseca","fromEmail":"fonseca@diku.dk","sentAt":"2005-07-20T12:05:01Z","receivedAt":"2005-07-20T12:05:01Z","isPatch":true,"sender":{"key":"fonseca@diku.dk","avatar":"https://gravatar.com/avatar/f82f3ad698717c51873b020c750a92438c820a24056dc39fe4d07baa10a92264?d=mp&s=160"},"body":"Fix displaying of an error message when cg-help is called with unknown\ncommand and use $USAGE so the correct cg-help usage string is printed.\nDrop useless use of cat in print_help(). Improve the asciidoc markup.\n\nSigned-off-by: Jonas Fonseca <fonseca@diku.dk>\n---\n\ndiff --git a/cg-Xlib b/cg-Xlib\n--- a/cg-Xlib\n+++ b/cg-Xlib\n@@ -172,7 +172,7 @@ print_help()\n \twhich \"cg-$1\" >/dev/null 2>&1 || exit 1\n \tsed -n '/^USAGE=/,0s/.*\"\\(.*\\)\"/Usage: \\1/p' < $(which cg-$1) \n \techo\n-\tcat $(which cg-$1) | sed -n '3,/^$/s/^# *//p'\n+\tsed -n '3,/^$/s/^# *//p' < $(which cg-$1)\n \texit\n }\n \ndiff --git a/cg-admin-uncommit b/cg-admin-uncommit\n--- a/cg-admin-uncommit\n+++ b/cg-admin-uncommit\n@@ -14,14 +14,14 @@\n # -t::\n #\tThis optional parameter makes `cg-admin-uncommit` to roll back\n #\tthe tree as well to the previous commit. Without this option\n-#\t(by default) Cogito keeps the tree in its current state,\n+#\t(by default) 'Cogito' keeps the tree in its current state,\n #\ttherefore generating tree with local changes against the target\n #\tcommit, consisting of the changes in the rolled back commits.\n #\n # CAVEATS\n # -------\n # This command can be dangerous! It is safe to do as long as you do not\n-# push the commit out in the meantime, but you should NEVER uncommit an\n+# push the commit out in the meantime, but you should 'NEVER' uncommit an\n # already pushed out commit. Things will break for the pullers since you\n # just broke the fast-forward merging mechanism (the new commit is not\n # descendant of the previous one). The future push scripts will refuse\ndiff --git a/cg-commit b/cg-commit\n--- a/cg-commit\n+++ b/cg-commit\n@@ -17,7 +17,7 @@\n # -------\n # -C::\n #\tMake `cg-commit` ignore the cache and just commit the thing as-is.\n-#\tNote, this is used internally by Cogito when merging. This option\n+#\tNote, this is used internally by 'Cogito' when merging. This option\n #\tdoes not make sense when files are given on the command line.\n #\n # -mMESSAGE::\ndiff --git a/cg-diff b/cg-diff\n--- a/cg-diff\n+++ b/cg-diff\n@@ -3,7 +3,7 @@\n # Make a diff between two GIT trees.\n # Copyright (c) Petr Baudis, 2005\n #\n-# Outputs a diff for converting the first tree to the second one.\n+# Outputs a diff for converting between two trees.\n # By default compares the current working tree to the state at the\n # last commit. The output will automatically be displayed in a pager\n # unless it is piped to a program.\ndiff --git a/cg-help b/cg-help\n--- a/cg-help\n+++ b/cg-help\n@@ -14,7 +14,7 @@\n # OPTIONS\n # -------\n # -c::\n-#\tColorize to the output.\n+#\tColorize the output.\n \n USAGE=\"cg-help [-c] [cg-COMMAND | COMMAND]\"\n _git_repo_unneeded=1\n@@ -76,7 +76,8 @@ colorize() {\n \n if [ \"$ARGS\" ]; then\n \tcmd=$(echo \"${ARGS[0]}\" | sed 's/^cg-//')\n-\t( print_help $cmd | colorize ) && exit\n+\tprint_help $cmd | colorize\n+\t[ \"${PIPESTATUS[0]}\" -eq 0 ] && exit\n \techo \"cg-help: no help available for command \\\"${ARGS[0]}\\\"\"\n \techo \"Call cg-help without any arguments for the list of available commands\"\n \texit 1\n@@ -90,7 +91,7 @@ ADVANCED_COMMANDS=\"$(ls $bin_path/cg-adm\n colorize <<__END__\n The Cogito version control system  $(cg-version)\n \n-Usage: cg-COMMAND [ARG]...\n+Usage: $USAGE\n \n Available commands:\n $(print_command_listing $REGULAR_COMMANDS)\ndiff --git a/cg-log b/cg-log\n--- a/cg-log\n+++ b/cg-log\n@@ -14,7 +14,7 @@\n # cg-log then displays only changes in those files.\n #\n # -c::\n-#\tColorize to the output. The used colors are listed below together\n+#\tColorize the output. The used colors are listed below together\n #\twith information about which log output (summary, full or both)\n #\tthey apply to:\n #\t\t- `author`:\t'cyan'\t\t(both)\n\n-- \nJonas Fonseca\n"},{"id":"6280","messageId":"20050720171221.GD17217@pasky.ji.cz","threadId":"1276","inReplyTo":"20050720120501.GA14074@diku.dk","subject":"Re: [PATCH] Misc documentation fixes and improvements","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2005-07-20T17:12:22Z","receivedAt":"2005-07-20T17:12:22Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Wed, Jul 20, 2005 at 02:05:01PM CEST, I got a letter\nwhere Jonas Fonseca <fonseca@diku.dk> told me that...\n> Fix displaying of an error message when cg-help is called with unknown\n> command and use $USAGE so the correct cg-help usage string is printed.\n> Drop useless use of cat in print_help(). Improve the asciidoc markup.\n> \n> Signed-off-by: Jonas Fonseca <fonseca@diku.dk>\n> ---\n> \n> diff --git a/cg-diff b/cg-diff\n> --- a/cg-diff\n> +++ b/cg-diff\n> @@ -3,7 +3,7 @@\n>  # Make a diff between two GIT trees.\n>  # Copyright (c) Petr Baudis, 2005\n>  #\n> -# Outputs a diff for converting the first tree to the second one.\n> +# Outputs a diff for converting between two trees.\n>  # By default compares the current working tree to the state at the\n>  # last commit. The output will automatically be displayed in a pager\n>  # unless it is piped to a program.\n\nI dropped this hunk (seems to only lose clarity).\n\n> diff --git a/cg-help b/cg-help\n> --- a/cg-help\n> +++ b/cg-help\n> @@ -90,7 +91,7 @@ ADVANCED_COMMANDS=\"$(ls $bin_path/cg-adm\n>  colorize <<__END__\n>  The Cogito version control system  $(cg-version)\n>  \n> -Usage: cg-COMMAND [ARG]...\n> +Usage: $USAGE\n>  \n>  Available commands:\n>  $(print_command_listing $REGULAR_COMMANDS)\n\nAnd I dropped the Usage string here altogether.\n\nThanks,\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"}]}