-
Notifications
You must be signed in to change notification settings - Fork 66
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
"hlx up" fails with "Could not find HEAD." on repos that are submodules #1794
Comments
my personal opinion is, that submodules cause more problems than they solve :-) |
I second @tripodsan's statement, having used submodules in some projects in the past. I haven't seen projects using submodules in recent years and I'd question that they're a popular choice. Unless there's a real use case IMHO I don't think it's worth supporting it. |
@tripodsan @stefan-guggisberg I agree submodules aren't great and monorepos in general are polarizing. It's hard to argue against the popularity of monorepos for dev environments, though, whether using submodules or another tool. It may be rare, but if I hit this error and wasn't motivated to find out why, I might have lost interest. At very least a better error message makes sense, imo I didn't realize the potential impact to support it in other components. If the consensus is "not needed" or "not wanted" I'll gladly drop the PR or convert it to an error message PR... wdyt |
An error msg like e.g. „git submodules aren‘t supported“ would be good.
…On Wed, 30 Jun 2021 at 19:44, Max Edell ***@***.***> wrote:
@tripodsan <https://github.com/tripodsan> @stefan-guggisberg
<https://github.com/stefan-guggisberg> I agree submodules aren't great
and monorepos in general are polarizing. It's hard to argue against the
popularity of monorepos for dev environments, though, whether using
submodules or another tool. It may be rare, but if I hit this error and
wasn't motivated to find out why, I might have lost interest. At very least
a better error message makes sense, imo
I didn't realize the potential impact to support it in other components.
If the consensus is "not needed" or "not wanted" I'll gladly drop the PR or
convert it to an error message PR... wdyt
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1794 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALY3SNIELALVFI4DKGAUFTTVNJV7ANCNFSM47Q3MGFQ>
.
|
🎉 This issue has been resolved in version 13.4.50 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
I pulled a repo as a submodule to keep all helix repos together to explore things in a single place, but when running
hlx up
on a repo that doesn't have a.git
folder (instead, a.git
file that points to the parent's gitdir) the command fails with the error:Could not find HEAD.
It looks like this is due to the way the gitdir is resolved, currently the UpCommand assumes it's in a regular repository. GitUtils also seem to use the default gitdir behavior for all APIs (which ends up being dir/ + .git).
To Reproduce
Steps to reproduce the behavior:
git init
git submodule add <some helix repo url>
cd repo
hlx up
Expected behavior
Repos as a submodules is a popular format (but maybe uncommon for helix sites). I think this should be supported, or if not, then the
.git
path should be checked for "directory-ness" and not just existence, so the error message is more clear.Version:
13.4.49
I have a fix working and could add some unit tests to PR this, but wanted to find out if this has been discussed already.. I noticed issue #614 speaks to submodules inside the project, but not the other way around.
The text was updated successfully, but these errors were encountered: