You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that the support for diffs including submodule changes could be improved. Some examples :
Let's say I have a project with a submodule ("brooklyn"), and I modify a file in the submodule :
$ git status
On branch add-sub
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
(commit or discard the untracked or modified content in submodules)
modified: brooklyn (modified content)
no changes added to commit (use "git add" and/or "git commit -a")
that's good, but it could be useful to have the header be
modified: brooklyn (modified content)
to reflect the output of git status. SImilarly, if new commits were added to the submodule, the header could indicate it : modified: brooklyn (new commits)
I usually set diff.submodule log. With this setting, the brooklyn submodule looses its header with (or without) diff-so-fancy :
I've never used sub-modules. If you can submit a test case that adequately recreates this issue in a reliable and repeatable manner I can investigate this new feature..
I'll try to provide a test case for you using both values of diff.submodule.
I'm using a demo repo from github where the css and js folder are submodules.
git clone --recurse-submodules https://github.com/githubtraining/example-dependency
cd example-dependency
cd js
# Making some changes in a submoduleecho -e "\n\n Committed test diff in README">> README.md
git commit -am "Update README"echo -e "\n\n Dirty test diff in README">> README.md
cd ..
# This diff shows the committed changes to the submodule
git config diff.submodule log
git diff
# This one shows the full diff
git config diff.submodule diff
git diff
First, great project!!
I noticed that the support for diffs including submodule changes could be improved. Some examples :
Let's say I have a project with a submodule ("brooklyn"), and I modify a file in the submodule :
the output of git diff, using diff-so-fancy is
that's good, but it could be useful to have the header be
to reflect the output of git status. SImilarly, if new commits were added to the submodule, the header could indicate it :
modified: brooklyn (new commits)
I usually set
diff.submodule log
. With this setting, the brooklyn submodule looses its header with (or without) diff-so-fancy :Same thing with
git diff --submodule=diff
, the submodule itself doesn't have a header but its modified files do have one :The text was updated successfully, but these errors were encountered: