Carthage/Carthage

Better error for misconfigured git submodule

Aperta

#2572 aperta il 10 set 2018

 (1 commento) (0 reazioni) (0 assegnatari)Swift (1544 fork)batch import
enhancementhelp wanted

Metriche repository

Star
 (15.179 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

Steps to reproduce

  1. mkdir tmp
  2. cd tmp
  3. git init
  4. echo 'github "antitypical/Result"'>Cartfile
  5. carthage update --use-submodules --no-build
  6. git add .
  7. git commit -m 'Initial'
  8. git rm Carthage/Checkouts/Result
  9. git reset HEAD .gitmodules
  10. git checkout -- .gitmodules
  11. git commit -m 'Bork it'
  12. carthage bootstrap --use-submodules --no-build

Expected A nice error that explains what you do and how to fix it or possibly even fix it automatically.

Fix:

  1. git submodule add -f {url to submodule} {path to submodule}
  2. git commit

Actual This unfriendly error. If you don't know to avoid doing the above, you definitely won't understand the error.

Parse error: expected submodule commit SHA in output of task (ls-tree -z HEAD Carthage/Checkouts/Result) but encountered:

Guida contributor