Re: [PATCH] Add an optional <mode> argument to commit/status -u|--untracked-files option

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jeff King
Date: Tuesday, June 3, 2008 - 3:27 pm

On Tue, Jun 03, 2008 at 11:17:28PM +0200, Marius Storm-Olsen wrote:


I think it would be reasonable to make "-u" mean the same as always, and
for "--untracked-files" to have an optional argument. There isn't direct
support for that construct in parse_options, but you could just make it
two separate options that happen to tweak the same value (though I guess
they would be displayed separately in the auto-generated usage).

Some GNU utils use this strategy to extend existing options. E.g., "ls
-p" comes from XSI and takes no argument, but the long-option form of
--indicator-style=<none|slash|file-type|classify> gives more options.

That makes it a little less pleasant to type the extended version, but
compatibility is maintained.  Though I tend to wonder about this option
in particular...isn't this generally a user preference? Should it
perhaps be found in the config file instead?

-Peff
--
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:
Re: [PATCH] Add an optional <mode> argument to commit/stat ..., Jeff King, (Tue Jun 3, 3:27 pm)