Skip to content

submodules without commits #152

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
ghost opened this issue Apr 7, 2014 · 2 comments
Closed

submodules without commits #152

ghost opened this issue Apr 7, 2014 · 2 comments
Assignees

Comments

@ghost
Copy link

ghost commented Apr 7, 2014

Traceback (most recent call last):
File "GitPython.python.examples/_Examples/git submodule/test.py", line 7, in
print repo.submodules
File "/Library/Python/2.7/site-packages/GitPython-0.3.2.RC1-py2.7.egg/git/repo/base.py", line 238, in submodules
return Submodule.list_items(self)
File "/Library/Python/2.7/site-packages/GitPython-0.3.2.RC1-py2.7.egg/git/util.py", line 659, in list_items
out_list.extend(cls.iter_items(repo, _args, *_kwargs))
File "/Library/Python/2.7/site-packages/GitPython-0.3.2.RC1-py2.7.egg/git/objects/submodule/base.py", line 883, in iter_items
pc = repo.commit(parent_commit) # parent commit instance
File "/Library/Python/2.7/site-packages/GitPython-0.3.2.RC1-py2.7.egg/git/repo/base.py", line 378, in commit
return self.rev_parse(str(rev)+"^0")
File "/Library/Python/2.7/site-packages/GitPython-0.3.2.RC1-py2.7.egg/git/repo/fun.py", line 151, in rev_parse
obj = name_to_object(repo, rev[:start])
File "/Library/Python/2.7/site-packages/GitPython-0.3.2.RC1-py2.7.egg/git/repo/fun.py", line 86, in name_to_object
raise BadObject(name)
gitdb.exc.BadObject: BadObject: 48454144
[Finished in 6.8s with exit code 1]

@Byron
Copy link
Member

Byron commented Jan 15, 2015

Just for completeness: This would now throw BadName, see #105 for more information.
Nonetheless, I am looking into this right now to see what the desired behaviour should be.

@Byron Byron closed this as completed in 26fc586 Jan 15, 2015
@Byron
Copy link
Member

Byron commented Jan 15, 2015

Please have a look at the commit message above for a summary on why this is considered fixed. In short, I believe that adding empty submodules is wrong in the first place, and doesn't seem to be possible either with the git-commandline, nor with git-python.

You can watch the archived live-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

1 participant