Re: [PATCH 2] count-objects: add human-readable size option

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Marcus Griep <marcus@...>
Cc: Git Mailing List <git@...>, Junio C Hamano <gitster@...>, Pierre Habouzit <madcoder@...>
Date: Thursday, August 14, 2008 - 2:51 pm

Marcus Griep, Thu, Aug 14, 2008 16:03:22 +0200:

AFAICS - no. I'd suggest removing "-h" from the unconditionally
reserved list of options (untested patch attached). "--help" is well
known (which could be a reason why coreutils uses just it).

On somewhat similar note, how about be a bit _less_ user-friendly in
the text messages? IOW, make things like "something didn't work,
please try doing 'git something-else'" configurable (ok, active by
default, by deactivatable). These take an awful lot of screen space.
The builtin fetch, checkout, add (the most often used commands) are
the chattiest. The text in commit buffer takes almost half of screen,
too.

--

diff --git a/parse-options.c b/parse-options.c
index fd08bb4..7f85cd7 100644
--- a/parse-options.c
+++ b/parse-options.c
@@ -267,8 +267,6 @@ int parse_options_step(struct parse_opt_ctx_t *ctx,
 
 		if (arg[1] != '-') {
 			ctx->opt = arg + 1;
-			if (*ctx->opt == 'h')
-				return parse_options_usage(usagestr, options);
 			switch (parse_short_opt(ctx, options)) {
 			case -1:
 				return parse_options_usage(usagestr, options);
@@ -278,8 +276,6 @@ int parse_options_step(struct parse_opt_ctx_t *ctx,
 			if (ctx->opt)
 				check_typos(arg + 1, options);
 			while (ctx->opt) {
-				if (*ctx->opt == 'h')
-					return parse_options_usage(usagestr, options);
 				switch (parse_short_opt(ctx, options)) {
 				case -1:
 					return parse_options_usage(usagestr, options);
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 2] count-objects: add human-readable size option, Marcus Griep, (Thu Aug 14, 12:21 am)
Re: [PATCH 2] count-objects: add human-readable size option, Alex Riesen, (Thu Aug 14, 2:51 pm)
Re: [PATCH 2] count-objects: add human-readable size option, Pierre Habouzit, (Fri Aug 15, 5:22 am)
Re: [PATCH 2] count-objects: add human-readable size option, Shawn O. Pearce, (Thu Aug 14, 12:38 am)
Re: [PATCH 2] count-objects: add human-readable size option, Johannes Schindelin, (Thu Aug 14, 10:05 am)