All of the "do we want color" flags default to -1 to
indicate that we don't have any color configured. This value
is handled in one of two ways:
1. In porcelain, we check early on whether the value is
still -1 after reading the config, and set it to the
value of color.ui (which defaults to 0).
2. In plumbing, it stays untouched as -1, and want_color
defaults it to off.
This works fine, but means that every porcelain has to check
and reassign its color flag. Now that want_color gives us a
place to put this check in a single spot, we can do that,
simplifying the calling code.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
|
||
|---|---|---|
| .. | ||
| add.c | ||
| annotate.c | ||
| apply.c | ||
| archive.c | ||
| bisect--helper.c | ||
| blame.c | ||
| branch.c | ||
| bundle.c | ||
| cat-file.c | ||
| check-attr.c | ||
| check-ref-format.c | ||
| checkout-index.c | ||
| checkout.c | ||
| clean.c | ||
| clone.c | ||
| commit-tree.c | ||
| commit.c | ||
| config.c | ||
| count-objects.c | ||
| describe.c | ||
| diff-files.c | ||
| diff-index.c | ||
| diff-tree.c | ||
| diff.c | ||
| fast-export.c | ||
| fetch-pack.c | ||
| fetch.c | ||
| fmt-merge-msg.c | ||
| for-each-ref.c | ||
| fsck.c | ||
| gc.c | ||
| grep.c | ||
| hash-object.c | ||
| help.c | ||
| index-pack.c | ||
| init-db.c | ||
| log.c | ||
| ls-files.c | ||
| ls-remote.c | ||
| ls-tree.c | ||
| mailinfo.c | ||
| mailsplit.c | ||
| merge-base.c | ||
| merge-file.c | ||
| merge-index.c | ||
| merge-ours.c | ||
| merge-recursive.c | ||
| merge-tree.c | ||
| merge.c | ||
| mktag.c | ||
| mktree.c | ||
| mv.c | ||
| name-rev.c | ||
| notes.c | ||
| pack-objects.c | ||
| pack-redundant.c | ||
| pack-refs.c | ||
| patch-id.c | ||
| prune-packed.c | ||
| prune.c | ||
| push.c | ||
| read-tree.c | ||
| receive-pack.c | ||
| reflog.c | ||
| remote-ext.c | ||
| remote-fd.c | ||
| remote.c | ||
| replace.c | ||
| rerere.c | ||
| reset.c | ||
| rev-list.c | ||
| rev-parse.c | ||
| revert.c | ||
| rm.c | ||
| send-pack.c | ||
| shortlog.c | ||
| show-branch.c | ||
| show-ref.c | ||
| stripspace.c | ||
| symbolic-ref.c | ||
| tag.c | ||
| tar-tree.c | ||
| unpack-file.c | ||
| unpack-objects.c | ||
| update-index.c | ||
| update-ref.c | ||
| update-server-info.c | ||
| upload-archive.c | ||
| var.c | ||
| verify-pack.c | ||
| verify-tag.c | ||
| write-tree.c | ||