-
-
Notifications
You must be signed in to change notification settings - Fork 906
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
.submodules leads to IndexError: list index out of range on info = self._cache[item] #613
Comments
Thanks for letting me know. I assume that the original repository that is showing the issue is not public, so we are left with an issue that is not reproducible. |
eh -- took me a while to find that repo where I originally ran into it (again blaming myself for not quoting enough info for myself)... found it -- now you can get the entirety of it in its dirty state from http://www.onerussian.com/tmp/phsyionet-challenge.tar.gz |
@yarikoptic Thanks for taking the time to look - I pulled the file and was able to easily reproduce the issue. Just to be on the safe side, I put it into a gist. This is how to reproduce the issue, assuming you have gitpython in your PYTHON_PATH: set -e
curl https://gist.githubusercontent.com/Byron/17073cdb4c3019675d34a4705339e962/raw/802129991aa0bd2c23ee0f600b2ec4cef88ffbad/challenge.base64.zip | base64 -D > challenge.zip
unzip challenge.zip
(cd challenge && python -c 'from git import Repo; print Repo(".").submodules') |
In datalad/datalad#1801 we ran into our datalad crashing because we used GitPython's parser for .gitmodules and used clean run: $> s=s123; builtin cd /tmp/; rm -rf /tmp/gitsub; mkdir /tmp/gitsub; cd /tmp/gitsub; git init; mkdir $s; cd $s; git init; touch 1; git add 1; git commit -m msg 1; cd ..; git submodule add ./$s $s; git add .gitmodules; git commit -m "added subm $s"
Initialized empty Git repository in /tmp/gitsub/.git/
Initialized empty Git repository in /tmp/gitsub/s123/.git/
[master (root-commit) 2b57b47] msg
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 1
s123/
Adding existing repo at 's123' to the index
[master (root-commit) 8990a73] added subm s123
2 files changed, 4 insertions(+)
create mode 100644 .gitmodules
create mode 160000 s123
2 10278.....................................:Thu 07 Sep 2017 12:11:07 PM EDT:.
(git)hopa:/tmp/gitsub[master]git
$> python -c 'import git; r=git.Repo("."); print(r.submodules)'
[git.Submodule(name=s123, path=s123, url=./s123, branch_path=refs/heads/master)] int:
bool:
|
not sure if related to still open #279
I have bunch of freshly added, and then also modified submodules. That leads to following kaboom:
Failed to replicate with a simplistic
so I guess I have missed some aspect
The text was updated successfully, but these errors were encountered: