Files
git/Documentation
Junio C Hamano 6c374008b1 diff_opt: track whether flags have been set explicitly
The diff_opt infrastructure sets flags based on defaults and command
line options.  It is impossible to tell whether a flag has been set
as a default or on explicit request.  Update the structure so that
this detection is possible:

 * Add an extra "opt->touched_flags" that keeps track of all the
   fields that have been touched by DIFF_OPT_SET and DIFF_OPT_CLR.

 * You may continue setting the default values to the flags, like
   commands in the "log" family do in cmd_log_init_defaults(), but
   after you finished setting the defaults, you clear the
   touched_flags field;

 * And then you let the usual callchain call diff_opt_parse(),
   allowing the opt->flags be set or unset, while keeping track of
   which bits the user touched;

 * There is an optional callback "opt->set_default" that is called
   at the very beginning to let you inspect touched_flags and update
   opt->flags appropriately, before the remainder of the diffcore
   machinery is set up, taking the opt->flags value into account.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-10 10:24:17 -07:00
..
2013-02-05 16:13:32 -08:00
2012-04-20 15:49:16 -07:00
2013-02-14 10:29:01 -08:00
2012-06-19 11:35:19 -07:00
2013-04-12 12:00:52 -07:00
2013-02-05 16:13:32 -08:00
2011-09-06 11:42:12 -07:00
2013-04-12 12:00:52 -07:00
2013-03-25 14:00:29 -07:00
2011-03-11 10:59:16 -05:00
2013-04-12 12:00:52 -07:00
2013-04-03 09:18:01 -07:00
2013-04-12 12:00:52 -07:00
2013-04-07 15:27:23 -07:00
2013-02-07 14:42:16 -08:00
2013-04-05 14:15:16 -07:00
2013-04-12 13:54:01 -07:00
2013-02-07 14:41:45 -08:00