Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Handle submodules with paths in git_submodule_update #3500

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

Merged
merged 2 commits into from
Nov 8, 2015

Conversation

ethomson
Copy link
Member

@ethomson ethomson commented Nov 4, 2015

In git_submodule_reload, we should read the configuration values for a submodule before updating the HEAD and index data. The configuration values may specify a path for the submodule (that is not the same as its name), and that path should be used to lookup HEAD and index data.

FWIW, we noticed this when trying to git_submodule_update submodules in a freshly-cloned https://github.com/boostorg/boost repository, where the submodule paths were not the same as the submodule names.

Edward Thomson added 2 commits November 4, 2015 16:53
Test that `git_submodule_update` can handle a submodule that is
freshly cloned and has a path differing from its name.
Reload the HEAD and index data for a submodule after reading the
configuration.  The configuration may specify a `path`, so we must
update HEAD and index data with that path in mind.
@ethomson ethomson force-pushed the submodules_with_path branch from bfa4593 to f4b0267 Compare November 4, 2015 21:55
carlosmn added a commit that referenced this pull request Nov 8, 2015
Handle submodules with paths in `git_submodule_update`
@carlosmn carlosmn merged commit 6194889 into libgit2:master Nov 8, 2015
@ethomson ethomson deleted the submodules_with_path branch February 29, 2016 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants