diff options
author | Brandon Williams <bmwill@google.com> | 2016-10-07 11:18:50 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-10-10 12:14:58 -0700 |
commit | 07c01b9fd927b35375bd3a7d4d9dbf7bb8509f09 (patch) | |
tree | 9b2ecd0acd4dea48b3a04925ff6a463975a25d24 /t | |
parent | e77aa336f116e8ff8a72d034494b3a476b78c3ee (diff) | |
download | git-07c01b9fd927b35375bd3a7d4d9dbf7bb8509f09.tar.gz git-07c01b9fd927b35375bd3a7d4d9dbf7bb8509f09.tar.xz |
ls-files: pass through safe options for --recurse-submodules
Pass through some known-safe options when recursing into submodules.
(--cached, -v, -t, -z, --debug, --eol)
Signed-off-by: Brandon Williams <bmwill@google.com>
Reviewed-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t3007-ls-files-recurse-submodules.sh | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/t/t3007-ls-files-recurse-submodules.sh b/t/t3007-ls-files-recurse-submodules.sh index b5a53c351..33a2ea71c 100755 --- a/t/t3007-ls-files-recurse-submodules.sh +++ b/t/t3007-ls-files-recurse-submodules.sh @@ -34,6 +34,18 @@ test_expect_success 'ls-files correctly outputs files in submodule' ' test_cmp expect actual ' +test_expect_success 'ls-files correctly outputs files in submodule with -z' ' + lf_to_nul >expect <<-\EOF && + .gitmodules + a + b/b + submodule/c + EOF + + git ls-files --recurse-submodules -z >actual && + test_cmp expect actual +' + test_expect_success 'ls-files does not output files not added to a repo' ' cat >expect <<-\EOF && .gitmodules @@ -86,15 +98,11 @@ test_incompatible_with_recurse_submodules () { " } -test_incompatible_with_recurse_submodules -z -test_incompatible_with_recurse_submodules -v -test_incompatible_with_recurse_submodules -t test_incompatible_with_recurse_submodules --deleted test_incompatible_with_recurse_submodules --modified test_incompatible_with_recurse_submodules --others test_incompatible_with_recurse_submodules --stage test_incompatible_with_recurse_submodules --killed test_incompatible_with_recurse_submodules --unmerged -test_incompatible_with_recurse_submodules --eol test_done |