diff options
| author | Jiang Xin <worldhello.net@gmail.com> | 2021-08-03 17:03:35 +0800 |
|---|---|---|
| committer | Jiang Xin <worldhello.net@gmail.com> | 2021-08-03 17:03:35 +0800 |
| commit | 972c9cf6aed660f3b4189a8f2adda505e67110ff (patch) | |
| tree | 350bb2a29eb3360cdf36a30d8c8e7c76c3e61851 /builtin/diff-index.c | |
| parent | l10n: fixed typos of mismatched constant strings (diff) | |
| parent | Git 2.33-rc0 (diff) | |
| download | git-972c9cf6aed660f3b4189a8f2adda505e67110ff.tar.gz git-972c9cf6aed660f3b4189a8f2adda505e67110ff.zip | |
Merge branch 'master' of github.com:git/git
* 'master' of github.com:git/git: (397 commits)
Git 2.33-rc0
The seventh batch
ci/install-dependencies: handle "sparse" job package installs
ci: run "apt-get update" before "apt-get install"
cache-tree: prefetch in partial clone read-tree
unpack-trees: refactor prefetching code
pack-bitmap: check pack validity when opening bitmap
bundle tests: use test_cmp instead of grep
bundle tests: use ">file" not ": >file"
The sixth batch
doc: pull: fix rebase=false documentation
pack-bitmap: clarify comment in filter_bitmap_exclude_type()
doc: clarify description of 'submodule.recurse'
doc/git-config: simplify "override" advice for FILES section
doc/git-config: clarify GIT_CONFIG environment variable
doc/git-config: explain --file instead of referring to GIT_CONFIG
t0000: fix test if run with TEST_OUTPUT_DIRECTORY
multi-pack-index: fix potential segfault without sub-command
refs/debug: quote prefix
t0000: clear GIT_SKIP_TESTS before running sub-tests
...
Diffstat (limited to 'builtin/diff-index.c')
| -rw-r--r-- | builtin/diff-index.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/builtin/diff-index.c b/builtin/diff-index.c index 176fe7ff2b..cf09559e42 100644 --- a/builtin/diff-index.c +++ b/builtin/diff-index.c @@ -2,6 +2,7 @@ #include "cache.h" #include "config.h" #include "diff.h" +#include "diff-merges.h" #include "commit.h" #include "revision.h" #include "builtin.h" @@ -27,6 +28,12 @@ int cmd_diff_index(int argc, const char **argv, const char *prefix) rev.abbrev = 0; prefix = precompose_argv_prefix(argc, argv, prefix); + /* + * We need no diff for merges options, and we need to avoid conflict + * with our own meaning of "-m". + */ + diff_merges_suppress_options_parsing(); + argc = setup_revisions(argc, argv, &rev, NULL); for (i = 1; i < argc; i++) { const char *arg = argv[i]; @@ -35,6 +42,8 @@ int cmd_diff_index(int argc, const char **argv, const char *prefix) option |= DIFF_INDEX_CACHED; else if (!strcmp(arg, "--merge-base")) option |= DIFF_INDEX_MERGE_BASE; + else if (!strcmp(arg, "-m")) + rev.match_missing = 1; else usage(diff_cache_usage); } |
