Merge branch 'sj/untracked-files-in-submodule-directory-is-not-dirty'
"git diff" showed a submodule working tree with untracked cruft as "Submodule commit <objectname>-dirty", but a natural expectation is that the "-dirty" indicator would align with "git describe --dirty", which does not consider having untracked files in the working tree as source of dirtiness. The inconsistency has been fixed. * sj/untracked-files-in-submodule-directory-is-not-dirty: diff: do not show submodule with untracked files as "-dirty"
This commit is contained in:
@ -849,6 +849,12 @@ test_expect_success 'setup different kinds of dirty submodules' '
|
||||
cat >expected <<-\EOF &&
|
||||
dirty-both-ways
|
||||
dirty-head
|
||||
EOF
|
||||
test_cmp expected actual &&
|
||||
git -C for-submodules diff-files --name-only --ignore-submodules=none >actual &&
|
||||
cat >expected <<-\EOF &&
|
||||
dirty-both-ways
|
||||
dirty-head
|
||||
dirty-otherwise
|
||||
EOF
|
||||
test_cmp expected actual &&
|
||||
|
Reference in New Issue
Block a user