Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better error for misconfigured git submodule #2572

Open
mdiep opened this issue Sep 10, 2018 · 1 comment
Open

Better error for misconfigured git submodule #2572

mdiep opened this issue Sep 10, 2018 · 1 comment

Comments

@mdiep
Copy link
Member

mdiep commented Sep 10, 2018

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:
@nferruzzi
Copy link

I'm new to carthage and I've been stuck hours with this error on my repo, please do something about it because its a nonsense

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants