On Mon, Oct 19, 2009 at 08:07, Alex Riesen <raa.lkml@xxxxxxxxx> wrote: > On Mon, Oct 19, 2009 at 00:49, Junio C Hamano <gitster@xxxxxxxxx> wrote: >> Alex Riesen <raa.lkml@xxxxxxxxx> writes: >>> + OPT_SET_INT(0, "dwim", &dwim_new_local_branch, >>> + "Guess local branch from remote reference (default)", 0), >> >> Humph, how does SET_INT know to set it to 1 with --dwim and set it to 0 >> with --no-dwim? > > It seems to do, though (I checked before sending). > Right, just looked at the parse-options: it is defined for all types. parse-options.c +/get_value const int unset = flags & OPT_UNSET; ... case OPTION_SET_INT: *(int *)opt->value = unset ? 0 : opt->defval; return 0; Very useful. -- To unsubscribe from this list: 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