summaryrefslogtreecommitdiff
path: root/submodule.h
diff options
context:
space:
mode:
authorJacob Keller <jacob.keller@gmail.com>2016-08-31 23:27:25 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-09-01 01:07:10 (GMT)
commitfd47ae6a5b9cc0cfc56c1f7c43db612d26ca4b75 (patch)
tree87f05e2e08d728def4944fdd4914b7c9001583f9 /submodule.h
parent8e6df65015f9a947d9ccca8950c2d60a4600cba2 (diff)
downloadgit-fd47ae6a5b9cc0cfc56c1f7c43db612d26ca4b75.zip
git-fd47ae6a5b9cc0cfc56c1f7c43db612d26ca4b75.tar.gz
git-fd47ae6a5b9cc0cfc56c1f7c43db612d26ca4b75.tar.bz2
diff: teach diff to display submodule difference with an inline diff
Teach git-diff and friends a new format for displaying the difference of a submodule. The new format is an inline diff of the contents of the submodule between the commit range of the update. This allows the user to see the actual code change caused by a submodule update. Add tests for the new format and option. Signed-off-by: Jacob Keller <jacob.keller@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'submodule.h')
-rw-r--r--submodule.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/submodule.h b/submodule.h
index d83df57..d9e197a 100644
--- a/submodule.h
+++ b/submodule.h
@@ -46,6 +46,12 @@ void show_submodule_summary(FILE *f, const char *path,
struct object_id *one, struct object_id *two,
unsigned dirty_submodule, const char *meta,
const char *del, const char *add, const char *reset);
+void show_submodule_inline_diff(FILE *f, const char *path,
+ const char *line_prefix,
+ struct object_id *one, struct object_id *two,
+ unsigned dirty_submodule, const char *meta,
+ const char *del, const char *add, const char *reset,
+ const struct diff_options *opt);
void set_config_fetch_recurse_submodules(int value);
void check_for_new_submodule_commits(unsigned char new_sha1[20]);
int fetch_populated_submodules(const struct argv_array *options,