mirror of
https://github.com/git/git.git
synced 2026-03-13 18:33:25 +01:00
Merge branch 'jc/diff--cached' into next
* jc/diff--cached: Revert "git-diff: Introduce --index and deprecate --cached." git-svn: correctly display fatal() error messages git-svn: exit with status 1 for test failures Allow subcommand.color and color.subcommand color configuration git-push: document removal of remote ref with :<dst> pathspec
This commit is contained in:
@@ -137,16 +137,16 @@ branch.<name>.merge::
|
||||
this option, `git pull` defaults to merge the first refspec fetched.
|
||||
Specify multiple values to get an octopus merge.
|
||||
|
||||
pager.color::
|
||||
color.pager::
|
||||
A boolean to enable/disable colored output when the pager is in
|
||||
use (default is true).
|
||||
|
||||
diff.color::
|
||||
color.diff::
|
||||
When true (or `always`), always use colors in patch.
|
||||
When false (or `never`), never. When set to `auto`, use
|
||||
colors only when the output is to the terminal.
|
||||
|
||||
diff.color.<slot>::
|
||||
color.diff.<slot>::
|
||||
Use customized color for diff colorization. `<slot>`
|
||||
specifies which part of the patch to use the specified
|
||||
color, and is one of `plain` (context text), `meta`
|
||||
@@ -271,19 +271,19 @@ showbranch.default::
|
||||
The default set of branches for gitlink:git-show-branch[1].
|
||||
See gitlink:git-show-branch[1].
|
||||
|
||||
status.color::
|
||||
color.status::
|
||||
A boolean to enable/disable color in the output of
|
||||
gitlink:git-status[1]. May be set to `true` (or `always`),
|
||||
`false` (or `never`) or `auto`, in which case colors are used
|
||||
only when the output is to a terminal. Defaults to false.
|
||||
|
||||
status.color.<slot>::
|
||||
color.status.<slot>::
|
||||
Use customized color for status colorization. `<slot>` is
|
||||
one of `header` (the header text of the status message),
|
||||
`updated` (files which are updated but not committed),
|
||||
`changed` (files which are changed but not updated in the index),
|
||||
or `untracked` (files which are not tracked by git). The values of
|
||||
these variables may be specified as in diff.color.<slot>.
|
||||
these variables may be specified as in color.diff.<slot>.
|
||||
|
||||
tar.umask::
|
||||
By default, gitlink:git-tar-tree[1] sets file and directories modes
|
||||
|
||||
@@ -22,10 +22,8 @@ the number of trees given to the command.
|
||||
|
||||
* When one <tree-ish> is given, the working tree and the named
|
||||
tree are compared, using `git-diff-index`. The option
|
||||
`--index` can be given to compare the index file and
|
||||
`--cached` can be given to compare the index file and
|
||||
the named tree.
|
||||
`--cached` is a deprecated alias for `--index`. It's use is
|
||||
discouraged.
|
||||
|
||||
* When two <tree-ish>s are given, these two trees are compared
|
||||
using `git-diff-tree`.
|
||||
@@ -49,7 +47,7 @@ Various ways to check your working tree::
|
||||
+
|
||||
------------
|
||||
$ git diff <1>
|
||||
$ git diff --index <2>
|
||||
$ git diff --cached <2>
|
||||
$ git diff HEAD <3>
|
||||
------------
|
||||
+
|
||||
|
||||
@@ -49,12 +49,14 @@ corresponding remotes file---see below), then all the
|
||||
refs that exist both on the local side and on the remote
|
||||
side are updated.
|
||||
+
|
||||
Some short-cut notations are also supported.
|
||||
`tag <tag>` means the same as `refs/tags/<tag>:refs/tags/<tag>`.
|
||||
+
|
||||
* `tag <tag>` means the same as `refs/tags/<tag>:refs/tags/<tag>`.
|
||||
* A parameter <ref> without a colon is equivalent to
|
||||
<ref>`:`<ref>, hence updates <ref> in the destination from <ref>
|
||||
in the source.
|
||||
A parameter <ref> without a colon is equivalent to
|
||||
<ref>`:`<ref>, hence updates <ref> in the destination from <ref>
|
||||
in the source.
|
||||
+
|
||||
Pushing an empty <src> allows you to delete the <dst> ref from
|
||||
the remote repository.
|
||||
|
||||
\--all::
|
||||
Instead of naming each ref to push, specifies that all
|
||||
@@ -75,7 +77,8 @@ include::urls.txt[]
|
||||
|
||||
Author
|
||||
------
|
||||
Written by Junio C Hamano <junkio@cox.net>
|
||||
Written by Junio C Hamano <junkio@cox.net>, later rewritten in C
|
||||
by Linus Torvalds <torvalds@osdl.org>
|
||||
|
||||
Documentation
|
||||
--------------
|
||||
|
||||
@@ -137,7 +137,7 @@ static int builtin_diff_index(struct rev_info *revs,
|
||||
int cached = 0;
|
||||
while (1 < argc) {
|
||||
const char *arg = argv[1];
|
||||
if (!strcmp(arg, "--index") || !strcmp(arg, "--cached"))
|
||||
if (!strcmp(arg, "--cached"))
|
||||
cached = 1;
|
||||
else
|
||||
usage(builtin_diff_usage);
|
||||
|
||||
@@ -118,7 +118,7 @@ static int git_format_config(const char *var, const char *value)
|
||||
strcat(extra_headers, value);
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(var, "diff.color")) {
|
||||
if (!strcmp(var, "diff.color") || !strcmp(var, "color.diff")) {
|
||||
return 0;
|
||||
}
|
||||
return git_log_config(var, value);
|
||||
|
||||
2
config.c
2
config.c
@@ -314,7 +314,7 @@ int git_default_config(const char *var, const char *value)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!strcmp(var, "pager.color")) {
|
||||
if (!strcmp(var, "pager.color") || !strcmp(var, "color.pager")) {
|
||||
pager_use_color = git_config_bool(var,value);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -712,10 +712,13 @@ _git_repo_config ()
|
||||
core.legacyHeaders
|
||||
i18n.commitEncoding
|
||||
diff.color
|
||||
color.diff
|
||||
diff.renameLimit
|
||||
diff.renames
|
||||
pager.color
|
||||
color.pager
|
||||
status.color
|
||||
color.status
|
||||
log.showroot
|
||||
show.difftree
|
||||
showbranch.default
|
||||
|
||||
4
diff.c
4
diff.c
@@ -60,7 +60,7 @@ int git_diff_ui_config(const char *var, const char *value)
|
||||
diff_rename_limit_default = git_config_int(var, value);
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(var, "diff.color")) {
|
||||
if (!strcmp(var, "diff.color") || !strcmp(var, "color.diff")) {
|
||||
diff_use_color_default = git_config_colorbool(var, value);
|
||||
return 0;
|
||||
}
|
||||
@@ -74,7 +74,7 @@ int git_diff_ui_config(const char *var, const char *value)
|
||||
diff_detect_rename_default = DIFF_DETECT_RENAME;
|
||||
return 0;
|
||||
}
|
||||
if (!strncmp(var, "diff.color.", 11)) {
|
||||
if (!strncmp(var, "diff.color.", 11) || !strncmp(var, "color.diff.", 11)) {
|
||||
int slot = parse_diff_color_slot(var, 11);
|
||||
color_parse(value, var, diff_colors[slot]);
|
||||
return 0;
|
||||
|
||||
@@ -297,11 +297,11 @@ void wt_status_print(struct wt_status *s)
|
||||
|
||||
int git_status_config(const char *k, const char *v)
|
||||
{
|
||||
if (!strcmp(k, "status.color")) {
|
||||
if (!strcmp(k, "status.color") || !strcmp(k, "color.status")) {
|
||||
wt_status_use_color = git_config_colorbool(k, v);
|
||||
return 0;
|
||||
}
|
||||
if (!strncmp(k, "status.color.", 13)) {
|
||||
if (!strncmp(k, "status.color.", 13) || !strncmp(k, "color.status", 13)) {
|
||||
int slot = parse_status_slot(k, 13);
|
||||
color_parse(v, k, wt_status_colors[slot]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user