1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-10-31 22:37:54 +01:00
git/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
api-allocation-growing.txt
api-builtin.txt
api-decorate.txt
api-diff.txt
api-directory-listing.txt Read .gitignore from index if it is skip-worktree 2009-08-23 17:13:33 -07:00
api-gitattributes.txt
api-grep.txt
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
api-index-skel.txt
api-index.sh
api-lockfile.txt
api-object-access.txt
api-parse-options.txt Add an optional argument for --color options 2010-02-18 17:21:40 -08:00
api-quote.txt
api-remote.txt
api-revision-walking.txt
api-run-command.txt Fix typos in technical documentation. 2010-01-31 10:24:53 -08:00
api-setup.txt
api-strbuf.txt strbuf: add strbuf_addbuf_percentquote 2010-01-14 09:25:15 -08:00
api-string-list.txt
api-tree-walking.txt
api-xdiff-interface.txt
pack-format.txt
pack-heuristics.txt
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
shallow.txt
trivial-merge.txt