diff options
Diffstat (limited to 'builtin/diff-tree.c')
| -rw-r--r-- | builtin/diff-tree.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/builtin/diff-tree.c b/builtin/diff-tree.c index 116097a404..d62caa6c8b 100644 --- a/builtin/diff-tree.c +++ b/builtin/diff-tree.c @@ -1,12 +1,16 @@ -#define USE_THE_INDEX_COMPATIBILITY_MACROS -#include "cache.h" +#define USE_THE_INDEX_VARIABLE +#include "builtin.h" #include "config.h" #include "diff.h" #include "commit.h" +#include "gettext.h" +#include "hex.h" #include "log-tree.h" -#include "builtin.h" #include "submodule.h" +#include "read-cache-ll.h" #include "repository.h" +#include "revision.h" +#include "tree.h" static struct rev_info log_tree_opt; @@ -83,8 +87,10 @@ static int diff_tree_stdin(char *line) } static const char diff_tree_usage[] = -"git diff-tree [--stdin] [-m] [-c | --cc] [-s] [-v] [--pretty] [-t] [-r] [--root] " -"[<common-diff-options>] <tree-ish> [<tree-ish>] [<path>...]\n" +"git diff-tree [--stdin] [-m] [-s] [-v] [--no-commit-id] [--pretty]\n" +" [-t] [-r] [-c | --cc] [--combined-all-paths] [--root] [--merge-base]\n" +" [<common-diff-options>] <tree-ish> [<tree-ish>] [<path>...]\n" +"\n" " -r diff recursively\n" " -c show combined diff for merge commits\n" " --cc show combined diff for merge commits removing uninteresting hunks\n" @@ -117,8 +123,12 @@ int cmd_diff_tree(int argc, const char **argv, const char *prefix) usage(diff_tree_usage); git_config(git_diff_basic_config, NULL); /* no "diff" UI options */ + + prepare_repo_settings(the_repository); + the_repository->settings.command_requires_full_index = 0; + repo_init_revisions(the_repository, opt, prefix); - if (read_cache() < 0) + if (repo_read_index(the_repository) < 0) die(_("index file corrupt")); opt->abbrev = 0; opt->diff = 1; |
