Skip to content

IOError on adding first submodule #117

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

Closed
Burstaholic opened this issue Aug 15, 2013 · 3 comments
Closed

IOError on adding first submodule #117

Burstaholic opened this issue Aug 15, 2013 · 3 comments
Assignees

Comments

@Burstaholic
Copy link

If there is not already a .gitmodules file, attempting to add a submodule through GitPython produces an IOError.

Creating the first submodule is a perfectly normal operation, and as such should not be considered an error - the .gitmodules file should just be created.

@hashar
Copy link
Contributor

hashar commented Sep 23, 2014

Dies out for me with:

IOError: /projects/somerepo/.gitmodules file was not accessible

@hashar
Copy link
Contributor

hashar commented Sep 23, 2014

A workaround is to create the .gitmodules file before invoking Repo.create_submodule():

open(os.path.join(parent_path, '.gitmodules'), 'a').close()

@Byron Byron added this to the v0.3.5 - bugfixes milestone Nov 14, 2014
@Byron Byron self-assigned this Jan 15, 2015
@Byron Byron closed this as completed in 27c31e2 Jan 15, 2015
Byron added a commit that referenced this issue Jan 15, 2015
Adjusted code to not check for .gitmodules existence anymore, we will
deal with it.

Fixes #117
@Byron
Copy link
Member

Byron commented Jan 15, 2015

You can watch the development video on youtube

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

No branches or pull requests

3 participants