git-commit-vandalism/Documentation/technical
Mark Lodato 73e9da0196 Add an optional argument for --color options
Make git-branch, git-show-branch, git-grep, and all the diff-based
programs accept an optional argument <when> for --color.  The argument
is a colorbool: "always", "never", or "auto".  If no argument is given,
"always" is used;  --no-color is an alias for --color=never.  This makes
the command-line interface consistent with other GNU tools, such as `ls'
and `grep', and with the git-config color options.  Note that, without
an argument, --color and --no-color work exactly as before.

To implement this, two internal changes were made:

1. Allow the first argument of git_config_colorbool() to be NULL,
   in which case it returns -1 if the argument isn't "always", "never",
   or "auto".

2. Add OPT_COLOR_FLAG(), OPT__COLOR(), and parse_opt_color_flag_cb()
   to the option parsing library.  The callback uses
   git_config_colorbool(), so color.h is now a dependency
   of parse-options.c.

Signed-off-by: Mark Lodato <lodatom@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-18 17:21:40 -08:00
..
.gitignore Start preparing the API documents. 2007-12-14 22:29:38 -08:00
api-allocation-growing.txt Start preparing the API documents. 2007-12-14 22:29:38 -08:00
api-builtin.txt Documentation: fix a grammatical error in api-builtin.txt 2009-04-27 09:36:40 -07:00
api-decorate.txt Start preparing the API documents. 2007-12-14 22:29:38 -08:00
api-diff.txt Correct name of diff_flush() in API documentation 2008-02-28 13:35:09 -08:00
api-directory-listing.txt Read .gitignore from index if it is skip-worktree 2009-08-23 17:13:33 -07:00
api-gitattributes.txt Start preparing the API documents. 2007-12-14 22:29:38 -08:00
api-grep.txt Start preparing the API documents. 2007-12-14 22:29:38 -08:00
api-hash.txt technical-docs: document hash API 2009-12-17 21:54:50 -08:00
api-history-graph.txt Documentation: undocument gc'd function graph_release() 2009-11-19 23:05:17 -08:00
api-in-core-index.txt Start preparing the API documents. 2007-12-14 22:29:38 -08:00
api-index-skel.txt Start preparing the API documents. 2007-12-14 22:29:38 -08:00
api-index.sh Start preparing the API documents. 2007-12-14 22:29:38 -08:00
api-lockfile.txt close_lock_file(): new function in the lockfile API 2008-01-16 15:35:03 -08:00
api-object-access.txt Start preparing the API documents. 2007-12-14 22:29:38 -08:00
api-parse-options.txt Add an optional argument for --color options 2010-02-18 17:21:40 -08:00
api-quote.txt Start preparing the API documents. 2007-12-14 22:29:38 -08:00
api-remote.txt technical/api-remote: Describe new struct remote member pushurl 2009-06-09 23:46:47 -07:00
api-revision-walking.txt Revision walking documentation: document most important functions 2008-05-31 14:32:56 -07:00
api-run-command.txt Fix typos in technical documentation. 2010-01-31 10:24:53 -08:00
api-setup.txt Start preparing the API documents. 2007-12-14 22:29:38 -08:00
api-strbuf.txt strbuf: add strbuf_addbuf_percentquote 2010-01-14 09:25:15 -08:00
api-string-list.txt Fix two leftovers from path_list->string_list 2008-07-22 15:28:22 -07:00
api-tree-walking.txt technical-docs: document tree-walking API 2009-08-03 22:42:14 -07:00
api-xdiff-interface.txt Start preparing the API documents. 2007-12-14 22:29:38 -08:00
pack-format.txt Add description of OFS_DELTA to the pack format description 2008-04-06 17:22:46 -07:00
pack-heuristics.txt Assorted typo fixes 2006-07-09 02:42:41 -07:00
pack-protocol.txt Fix typos in technical documentation. 2010-01-31 10:24:53 -08:00
protocol-capabilities.txt Fix typos in technical documentation. 2010-01-31 10:24:53 -08:00
protocol-common.txt Update packfile transfer protocol documentation 2009-11-13 12:07:21 -08:00
racy-git.txt racy-git.txt: explain nsec problem in more detail 2009-10-09 14:56:32 -07:00
send-pack-pipeline.txt Update send-pack pipeline documentation. 2007-01-01 14:35:16 -08:00
shallow.txt Provide some technical documentation for shallow clones 2007-03-19 22:19:29 -07:00
trivial-merge.txt [PATCH] Finish documenting trivial merge rules 2005-09-24 22:05:55 -07:00