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

git merge with allow_bare option failed to reset workdir in the absorbed repo #707

shijinglu opened this issue May 22, 2019 · 0 comments


None yet
1 participant
Copy link

commented May 22, 2019

If a submodule is opened during merge, we the absorbed repo have valid workree:

$ cat $(git meta root)/.git/modules/foo/bar/config
     workdir = ../../../foo/bar

However, this is not always true in git-meta. There are occasions workdir is set to null even though it should not be. aka:

$ cat $(git meta root)/.git/modules/foo/bar/config
     workdir = null

The reasons is that, if the ALLOW_BARE option is enabled for normal merge, git meta will first try to merge the submodule inside the absorbed repo and treat it as a bare repo. And if there are any merge conflicts, git meta will then re open the subrepo. If a subrepo was first created as the bare repo, and then opened fully, git-meta won't reset the workdir and this leads to an empty submodule under foo/bar.

shijinglu added a commit to shijinglu/git-meta that referenced this issue Jun 5, 2019

fix twosigma#707: failed to set workdir correctly if submodule first …
…opened in bare mode then open with normal mode

@novalis novalis closed this in f21ed7f Jun 10, 2019

novalis added a commit that referenced this issue Jun 10, 2019

Merge pull request #709 from shijinglu/fixBareReopenIssue
fix #707: failed to set workdir correctly if submodule first opened i…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.