aboutsummaryrefslogtreecommitdiff
path: root/diff.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-09-12 15:34:31 -0700
committerJunio C Hamano <gitster@pobox.com>2016-09-12 15:34:31 -0700
commit305d7f133956a5f43c94d938beabbfbb0ac1753c (patch)
tree6f3324895e1885de1a7369da012c5132b9104176 /diff.h
parentcda1bbd474805e653dda8a71d4ea3790e2a66cbb (diff)
parentfd47ae6a5b9cc0cfc56c1f7c43db612d26ca4b75 (diff)
downloadgit-305d7f133956a5f43c94d938beabbfbb0ac1753c.tar.gz
git-305d7f133956a5f43c94d938beabbfbb0ac1753c.tar.xz
Merge branch 'jk/diff-submodule-diff-inline'
The "git diff --submodule={short,log}" mechanism has been enhanced to allow "--submodule=diff" to show the patch between the submodule commits bound to the superproject. * jk/diff-submodule-diff-inline: diff: teach diff to display submodule difference with an inline diff submodule: refactor show_submodule_summary with helper function submodule: convert show_submodule_summary to use struct object_id * allow do_submodule_path to work even if submodule isn't checked out diff: prepare for additional submodule formats graph: add support for --line-prefix on all graph-aware output diff.c: remove output_prefix_length field cache: add empty_tree_oid object and helper function
Diffstat (limited to 'diff.h')
-rw-r--r--diff.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/diff.h b/diff.h
index 7883729ed..ec76a9052 100644
--- a/diff.h
+++ b/diff.h
@@ -83,7 +83,6 @@ typedef struct strbuf *(*diff_prefix_fn_t)(struct diff_options *opt, void *data)
#define DIFF_OPT_DIRSTAT_BY_FILE (1 << 20)
#define DIFF_OPT_ALLOW_TEXTCONV (1 << 21)
#define DIFF_OPT_DIFF_FROM_CONTENTS (1 << 22)
-#define DIFF_OPT_SUBMODULE_LOG (1 << 23)
#define DIFF_OPT_DIRTY_SUBMODULES (1 << 24)
#define DIFF_OPT_IGNORE_UNTRACKED_IN_SUBMODULES (1 << 25)
#define DIFF_OPT_IGNORE_DIRTY_SUBMODULES (1 << 26)
@@ -110,11 +109,19 @@ enum diff_words_type {
DIFF_WORDS_COLOR
};
+enum diff_submodule_format {
+ DIFF_SUBMODULE_SHORT = 0,
+ DIFF_SUBMODULE_LOG,
+ DIFF_SUBMODULE_INLINE_DIFF
+};
+
struct diff_options {
const char *orderfile;
const char *pickaxe;
const char *single_follow;
const char *a_prefix, *b_prefix;
+ const char *line_prefix;
+ size_t line_prefix_length;
unsigned flags;
unsigned touched_flags;
@@ -155,6 +162,7 @@ struct diff_options {
int stat_count;
const char *word_regex;
enum diff_words_type word_diff;
+ enum diff_submodule_format submodule_format;
/* this is set by diffcore for DIFF_FORMAT_PATCH */
int found_changes;
@@ -174,7 +182,6 @@ struct diff_options {
diff_format_fn_t format_callback;
void *format_callback_data;
diff_prefix_fn_t output_prefix;
- int output_prefix_length;
void *output_prefix_data;
int diff_path_counter;