Re: Parse --o in format-patch

2013-06-28 Thread Jeff King
On Fri, Jun 28, 2013 at 06:44:40PM +0200, Fredrik Gustafsson wrote: > On Fri, Jun 28, 2013 at 12:31:53PM -0400, Jeff King wrote: > > It's possible to have an "optional" argument by using the > > PARSE_OPT_OPTARG flag. However, it is not backwards compatible from the > > user's perspective, as they

Re: Parse --o in format-patch

2013-06-28 Thread Fredrik Gustafsson
On Fri, Jun 28, 2013 at 12:31:53PM -0400, Jeff King wrote: > It's possible to have an "optional" argument by using the > PARSE_OPT_OPTARG flag. However, it is not backwards compatible from the > user's perspective, as they must use the "sticked" form: > > git format-patch -ooutdir ... > > to sp

Re: Parse --o in format-patch

2013-06-28 Thread Jeff King
On Fri, Jun 28, 2013 at 06:05:00PM +0200, Fredrik Gustafsson wrote: > I don't quite manage to figure out gits argv parsing and would need some > help on the way. > > I want: > git format-patch -o outdir HEAD~ > > Work exactly the way it does now, setting output_directory to outdir. > But I also

Parse --o in format-patch

2013-06-28 Thread Fredrik Gustafsson
Hi, I don't quite manage to figure out gits argv parsing and would need some help on the way. I want: git format-patch -o outdir HEAD~ Work exactly the way it does now, setting output_directory to outdir. But I also want git format-patch -o HEAD~ to set output_directory with a NULL value so that