GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Allow relative path url in submodules for submodule_update by t-webber · Pull Request #2062 · gitpython-developers/GitPython

Conversation

@t-webber

@t-webber t-webber commented Jul 22, 2025

Copy link
Copy Markdown
Contributor

fixes #944

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@t-webber
Allow relative path url in submodules for submodule_update
ec2e2c8
@t-webber
t-webber force-pushed the relative_path_submodules branch from 545618e to ec2e2c8 Compare July 22, 2025 10:27
Byron
Byron requested changes Jul 23, 2025
View reviewed changes

@Byron Byron left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for contributing!

I think with a test this can be merged. Maybe looking at the existing tests for submodules can help to set one up.

Thanks again.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@t-webber
Add test case for cloning submodules with relative path
1ee1e78
@t-webber
t-webber requested a review from Byron July 23, 2025 05:25
Byron
Byron approved these changes Jul 24, 2025
View reviewed changes

@Byron Byron left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot, this is great!

Something I'd like to also know is what happens if the submodule is 'hidden', and the URL starts with a .. This would mean the submodule resides within the parent repository, but is added as submodule under a different path.
Is this is a thing even? If you think so, please do feel free to contribute the respective test as well, but let's not block this PR on such an edge-case.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Byron
Byron merged commit bbb3d00 into gitpython-developers:main Jul 24, 2025
@t-webber

t-webber commented Jul 24, 2025

Copy link
Copy Markdown
Contributor Author

I am not sure I understand your question.

When you run git add ../../other/repo without specifying the path, git adds a default of repo as path in .gitmodules, so still in the same folder.

If you try and remove the path argument, you get an error when trying to update the submodule. You have the same error if the submodule has an absolute path. Git seems to always want a path and a URL field in the .gitmodules file.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@t-webber
t-webber deleted the relative_path_submodules branch July 24, 2025 06:32
@Byron

Byron commented Jul 24, 2025

Copy link
Copy Markdown
Member

Please don't mind it, it's not too important I think.

Thanks again for contributing this fix and a test🙏.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

Reviewers

@Byron Byron Byron approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

submodule update doesn't work with relative submodule paths (in GitPython 2.1.14)

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@t-webber @Byron
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.