Re: [PATCH/RFC] gitopt - command-line parsing enhancements

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano <junkio@xxxxxxx> wrote:
> Eric Wong <normalperson@xxxxxxxx> writes:
> 
> > Here's my take at a new command-line option parser to reduce wear on my
> > fingers.  It handles both long and short options, permuting, automatic
> > abbreviations, required arguments, optional arguments, and bundling.
> 
> Taken a superficial look at it.
> 
> Sounds nice, might be a tad too ambitious though.  Looks
> intrusive at places.

I wasn't overly happy with the addition of global variables to existing
files and the way they're set (setup_revisions).  But at least they're
static.  Of course, I'm not yet certain that I haven't introduced new
bugs.  All the tests pass, at least...

> And scary, especially the "eat" macros are very scary.

They look weird at first, but I think they help readability and
maintainability once you get used to them.  They let you focus on the
important part of the function while hiding the boring parts from you.
Quite elegant, imho.

-- 
Eric Wong
-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]