Dear diary, on Thu, Apr 21, 2005 at 02:41:52PM CEST, I got a letter
where Matthias Urlichs <[EMAIL PROTECTED]> told me that...
> This patch adds somewhat-improved usage messages to some of Linus' programs.
> Specifically, they now handle -? / --help.

-? is pretty non-standard. Any problem with going for -h?

> Signed-Off-By: Matthias Urlichs <[EMAIL PROTECTED]>
> 
> Index: check-files.c
> ===================================================================
> --- 42a073eb6b5bb397a3e8768a032463a7fa02e6b9/check-files.c  (mode:100644 
> sha1:7d16691aa9d51b5b4670d5837b3527ee7c7da79c)
> +++ 265515f9c4f089b1b61e9d2312c4b3babe189618/check-files.c  (mode:100644 
> sha1:be904b13659a60eab31787b010a64f2274048a9f)
> @@ -40,6 +40,8 @@
>  {
>       int i;
>  
> +     if(argc == 2 && (!strcmp(argv[1],"-?") || !strcmp(argv[1],"--help")))

(style-education-hat
+       if (argc == 2 && (!strcmp(argv[1], "-?") || !strcmp(argv[1], "--help")))
)

> +             usage("check-files filename...");

Let's either do <filename>* or FILE..., this mixing doesn't look good.

>       read_cache();
>       for (i = 1; i < argc ; i++)
>               check_file(argv[i]);
> Index: diff-tree.c
> ===================================================================
> --- 42a073eb6b5bb397a3e8768a032463a7fa02e6b9/diff-tree.c  (mode:100644 
> sha1:b0122e42631410fa579115f025efc3cab777cde6)
> +++ 265515f9c4f089b1b61e9d2312c4b3babe189618/diff-tree.c  (mode:100644 
> sha1:03fcc2fae2f0b06f3834f0b6e0d8762e70f49f51)
> @@ -193,6 +193,11 @@
>       }
>  }
>  
> +static const char diff_tree_usage[] = 
> +     "diff-tree [ -r (recurse) | -z (\\0-terminate) ]"
> +             "\n\t<tree sha1> <tree sha1>";

I'd say this is pretty confusnig. Just describe the parameters on
folowing lines in more detail, if you must.

> +
> +
>  int main(int argc, char **argv)
>  {
>       unsigned char old[20], new[20];

-- 
                                Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
C++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to