Skip to content

Submodule depth - #1009

Merged
Byron merged 3 commits into
gitpython-developers:masterfrom
liambeguin:submodule-depth
May 4, 2020
Merged

Submodule depth#1009
Byron merged 3 commits into
gitpython-developers:masterfrom
liambeguin:submodule-depth

Conversation

@liambeguin

Copy link
Copy Markdown
Contributor

No description provided.

Signed-off-by: Liam Beguin <liambeguin@gmail.com>
Signed-off-by: Liam Beguin <liambeguin@gmail.com>
Signed-off-by: Liam Beguin <liambeguin@gmail.com>
@liambeguin

Copy link
Copy Markdown
ContributorAuthor

Hi,

I managed to test it locally but I'm having trouble with the test case...
this is how I tested it:

$ virtualenv -p python3 venv
$ source venv/bin/activate
$ pip install . $ rm -rf foo && python ./test.py 

test.py file:

importgitrepo=git.Repo.init('foo')
sm_name='test'sm_depth=1sm=repo.create_submodule(sm_name, sm_name, url='https://github.com/gitpython-developers/GitPython.git', depth=sm_depth)
print(len(list(sm.module().iter_commits())), sm_depth)
assertlen(list(sm.module().iter_commits())) ==sm_depth

Byron pushed a commit that referenced this pull request May 4, 2020
…and time is previous. Since I could reproduce it and see it working
with the steps provided in the comment:
#1009 (comment)
I think it's good for now. We also assume there won't be a regression.
@Byron
Byron merged commit d6e1dcc into gitpython-developers:masterMay 4, 2020
@ByronByron added this to the v3.1.2 - Bugfixes milestone May 4, 2020
@Byron

Byron commented May 4, 2020

Copy link
Copy Markdown
Member

Thanks a lot, especially for making it so easy to reproduce it is indeed working.
Since I also couldn't figure out why the test ignored the passed depth parameter, even though it did show up in the invoked git command, I marked this test as permanently skipped to document the issue. Maybe someone will find the answer one day :).

@liambeguin

Copy link
Copy Markdown
ContributorAuthor

Great! Thanks for reviewing :)

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@liambeguin@Byron