Skip to content

submodule add + autocrlf + safecrlf

Brad King git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2submodule: Demonstrate failure to add with auto/safecrlft/t7400-submodule-basic.sh+13 -00 replies
2/2submodule: Tolerate auto/safecrlf when adding .gitmodulesgit-submodule.sh t/t7400-submodule-basic.sh+2 -26 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] submodule add + autocrlf + safecrlf

Hi Folks,

When 'git submodule add' uses 'git config' to create a '.gitmodules' file it gets LF newlines that the subsequent 'git add --force .gitmodules' rejects if autocrlf and safecrlf are both enabled. This series adds a test and proposes a fix that simply uses '-c core.safecrlf=false' to disable safecrlf when adding '.gitmodules'.

I'm not excited by allowing a LF file in work tree that has clearly been configured to prefer CRLF, but avoiding that for .gitmodules is probably a separate issue.

-Brad

Brad King (2):
submodule: Demonstrate failure to add with auto/safecrlf
submodule: Tolerate auto/safecrlf when adding .gitmodules

 git-submodule.sh           |    2 +-
 t/t7400-submodule-basic.sh |   13 +++++++++++++
 2 files changed, 14 insertions(+), 1 deletion(-)
Signature · 1 line
1.7.10