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 regression in recurse_submodules #585

Merged
merged 6 commits into from
Sep 23, 2021
Merged

Conversation

robbertvanginkel
Copy link
Contributor

This should fix #584.

Apparently the submodule subcommand does not support the --worktree argument, and needs to be run from a checked out worktree. By changing the first checkout to use git worktree (https://git-scm.com/docs/git-worktree, available since git 2.6.7) and the later submodules command to run in the new worktree, git submodules seems to be ok.

Verified this locally with git 2.10 (Sept 2016), similar to #421.

@robbertvanginkel
Copy link
Contributor Author

Need to dig deeper to understand what is going wrong about this on our windows ci.

private/pkg/git/cloner.go Outdated Show resolved Hide resolved
@bufdev
Copy link
Member

bufdev commented Sep 23, 2021

Approved pending removal of any debugging stuff to fix windows

@bufdev
Copy link
Member

bufdev commented Sep 23, 2021

Also can you add a "Fix ..." line to the CHANGELOG.md?

@robbertvanginkel robbertvanginkel merged commit de7662c into main Sep 23, 2021
@robbertvanginkel robbertvanginkel deleted the robbert/submodulefix branch September 23, 2021 16:08
Monirul1 pushed a commit to Monirul1/buf that referenced this pull request Apr 30, 2023
This should fix bufbuild#584.

Apparently the submodule subcommand does not support the --worktree argument, and needs to be run from a checked out worktree. By changing the first checkout to use git worktree (https://git-scm.com/docs/git-worktree, available since git 2.6.7) and the later submodules command to run in the new worktree, git submodules seems to be ok.

Verified this locally with git 2.10 (Sept 2016), similar to bufbuild#421.
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.

Started getting git-submodule cannot be used without a working tree with buf breaking
2 participants