Thread (4 messages) flat view 4 messages, 2 authors, 2016-06-15

Parse --o in format-patch

From: Fredrik Gustafsson <hidden>
Date: 2016-06-15 22:57:57

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 I can assign a default
value to it. Is that even possible with the current argv-parsing implementation?

The currect argv parser is using OPTION_CALLBACK so I thought that that
callback should be able to determine if there was an outdir supplied or
not.

Or is the correct solution to also add a bolean type OPTION_BOOLEAN for
-o?
-- 
Med vänliga hälsningar
Fredrik Gustafsson

tel: 0733-608274
e-post: iveqy@iveqy.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help