aboutsummaryrefslogtreecommitdiff
path: root/submodule.c
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2017-05-04 14:43:55 -0700
committerJunio C Hamano <gitster@pobox.com>2017-05-08 09:44:54 +0900
commit5a5221427cb8b78c3246ffa305900db935017c54 (patch)
tree4d45146dde8b5bc8e01dac7879348a6eef2ad664 /submodule.c
parent98985c6911ca0d475ae7b4e5401e6eae58ed8489 (diff)
downloadgit-5a5221427cb8b78c3246ffa305900db935017c54.tar.gz
git-5a5221427cb8b78c3246ffa305900db935017c54.tar.xz
diff: recurse into nested submodules for inline diff
When fd47ae6a5b (diff: teach diff to display submodule difference with an inline diff, 2016-08-31) was introduced, we did not think of recursing into nested submodules. When showing the inline diff for submodules, automatically recurse into nested submodules as well with inline submodule diffs. Signed-off-by: Stefan Beller <sbeller@google.com> Acked-by: Jacob Keller <jacob.keller@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'submodule.c')
-rw-r--r--submodule.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/submodule.c b/submodule.c
index 5a62aa296..be29b3471 100644
--- a/submodule.c
+++ b/submodule.c
@@ -475,7 +475,8 @@ void show_submodule_inline_diff(FILE *f, const char *path,
cp.no_stdin = 1;
/* TODO: other options may need to be passed here. */
- argv_array_push(&cp.args, "diff");
+ argv_array_pushl(&cp.args, "diff", "--submodule=diff", NULL);
+
argv_array_pushf(&cp.args, "--line-prefix=%s", line_prefix);
if (DIFF_OPT_TST(o, REVERSE_DIFF)) {
argv_array_pushf(&cp.args, "--src-prefix=%s%s/",