aboutsummaryrefslogtreecommitdiff
path: root/t/t4060-diff-submodule-option-diff-format.sh
Commit message (Collapse)AuthorAge
* t: move "git add submodule" into test blocksJeff King2017-06-15
| | | | | | | | | | | | | | | Some submodule tests do some setup outside of a test_expect block. This is bad because we won't actually check the outcome of those commands. But it's doubly so because "git add submodule" now produces a warning to stderr, which is not suppressed by the test scripts in non-verbose mode. This patch does the minimal to fix the annoying warnings. All three of these scripts could use more cleanup of related setup. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'jk/diff-submodule-diff-inline'Junio C Hamano2017-05-29
|\ | | | | | | | | | | | | "git diff --submodule=diff" now recurses into nested submodules. * jk/diff-submodule-diff-inline: diff: recurse into nested submodules for inline diff
| * diff: recurse into nested submodules for inline diffStefan Beller2017-05-08
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | diff: submodule inline diff to initialize env array.Stefan Beller2017-04-02
|/ | | | | | | | | | | | | | | | | | | | | | David reported: > When I try to run `git diff --submodule=diff` in a submodule which has > it's own submodules that have changes I get the error: fatal: bad > object. This happens, because we do not properly initialize the environment in which the diff is run in the submodule. That means we inherit the environment from the main process, which sets environment variables. (Apparently we do set environment variables which we do not set when not in a submodules, i.e. the .git directory is linked) This commit, just like fd47ae6a5b (diff: teach diff to display submodule difference with an inline diff, 2016-08-31) introduces bad test code (i.e. hard coded hash values), which will be cleanup up in a later patch. Reported-by: David Parrish <daveparrish@gmail.com> Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* diff: teach diff to display submodule difference with an inline diffJacob Keller2016-08-31
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>