Skip to content
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

Fix running pronto inside git submodules #387

Merged
merged 1 commit into from
Oct 31, 2020

Conversation

dsander
Copy link
Contributor

@dsander dsander commented Oct 24, 2020

Rugged::Repository#path returns the path for the git repository
itself. For git submodules the path is somewhere up the directory tree:

/root/.git/modules/submodule/ <-- Rugged::Repository#path
/root/submodule               <-- Rugged::Repository#workdir

Using Rugged::Repository#workdir fixes the issue for submodules and
also works for normal git repositories.

Fixes #76

`Rugged::Repository#path` returns the path for the git repository
itself. For git submodules the path is somewhere up the directory tree:

```
/root/.git/modules/submodule/ <-- Rugged::Repository#path
/root/submodule               <-- Rugged::Repository#workdir
```

Using `Rugged::Repository#workdir` fixes the issue for submodules and
also works for normal git repositories.

Fixes prontolabs#76
@dsander dsander requested a review from a team as a code owner October 24, 2020 13:37
Copy link
Member

@ashkulz ashkulz left a comment

Choose a reason for hiding this comment

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

Looks good, @dsander! I'm just concerned about the rugged dependency: do we need to bump it? I wasn't able to get very old versions to compile, so not sure when #workdir was introduced.

@dsander
Copy link
Contributor Author

dsander commented Oct 31, 2020

Hi!

I didn't check when it was introduced, but the workdir call seems to be present in 0.23.0 which is the oldest version supported by pronto.

@ashkulz ashkulz merged commit 2803d4b into prontolabs:master Oct 31, 2020
@ashkulz
Copy link
Member

ashkulz commented Oct 31, 2020

Thanks for the contribution!

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

Successfully merging this pull request may close these issues.

Problem when handling submodule changes
2 participants