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

Unable to resolve submodule with relative URL #6319

Closed
frosteyes opened this issue Sep 9, 2020 · 5 comments · Fixed by #6337
Closed

Unable to resolve submodule with relative URL #6319

frosteyes opened this issue Sep 9, 2020 · 5 comments · Fixed by #6337
Assignees
Labels
💊 bug Something isn't working 🔙 regression Damn, why it stops working?
Milestone

Comments

@frosteyes
Copy link

frosteyes commented Sep 9, 2020

Having a url like

https://gogs.server.com/org/repo1.git

This has a .gitmodules files with

[submodule "testsub"]
	path = testsub
	url = ../repo2.git

for accessing https://gogs.server.com/org/repo2.git

It works when you checkout the archive. But the link from the webinterface on https://gogs.server.com/org/repo1 points to https://gogs.server.com/repo2

The issue has previously been present - closed with fixed.
#1926

This is not the case anymore.

The build information.

Build Information
Application version 0.12.1
Git version 2.24.3
Go version go1.14.7
Build time 2020-08-27 06:59:23 UTC
Build commit43fc8260850090b55d4ee2586a819b3b6c016279

@unknwon unknwon added 💊 bug Something isn't working 🐣 pull request welcome Welcome to contribute for this! 🔙 regression Damn, why it stops working? labels Sep 9, 2020
@unknwon unknwon added this to the 0.13 milestone Sep 9, 2020
@unknwon
Copy link
Member

unknwon commented Sep 9, 2020

I think the solution is to update this function:

func InferSubmoduleURL(mod *git.Submodule) string {

@frosteyes
Copy link
Author

@unknwon agree - this is the place to fix it.

@unknwon unknwon changed the title Issue with relative submodule Unable to resolve submodule with relative URL Sep 9, 2020
@unknwon unknwon self-assigned this Sep 11, 2020
@unknwon unknwon removed the 🐣 pull request welcome Welcome to contribute for this! label Sep 11, 2020
@unknwon unknwon modified the milestones: 0.13, 0.12.2 Sep 18, 2020
@unknwon
Copy link
Member

unknwon commented Sep 18, 2020

Turns out the root cause is that the browser doesn't like the path ../repo2 (returned by InferSubmoduleURL). Nevertheless, fixed in #6337.

@unknwon
Copy link
Member

unknwon commented Sep 18, 2020

The patch will be included in the next patch release: 0.12.2.

@frosteyes
Copy link
Author

Thanks for this!! Super cool that you fixed it so fast.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 17, 2022
project-mirrors-bot-tu bot pushed a commit to project-mirrors/gitea-as-gogs-fork that referenced this issue Jan 23, 2025
… (#10991)

* Mulitple Gitea Doctor improvements (#10943)

Backport #10943

* Add `gitea doctor --list` flag to list the checks that will be run, including those by default
* Add `gitea doctor --run` to run specific checks
* Add `gitea doctor --all` to run all checks
* Add db version checker
* Add non-default recalculate merge bases check/fixer to doctor
* Add hook checker (Fix #9878) and ensure hooks are executable (Fix gogs#6319)
* Fix authorized_keys checker - slight change of functionality here because parsing the command is fragile and we should just check if the authorized_keys file is essentially the same as what gitea would produce. (This is still not perfect as order matters - we should probably just md5sum the two files.)
* Add SCRIPT_TYPE check (Fix #10977)
* Add `gitea doctor --fix` to attempt to fix what is possible to easily fix
* Add `gitea doctor --log-file` to set the log-file, be it a file, stdout or to switch off completely. (Fixes previously undetected bug with certain xorm logging configurations - see @6543 comment.)

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Switch to io.Writer instead of io.StringWriter

Signed-off-by: Andrew Thornton <art27@cantab.net>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
💊 bug Something isn't working 🔙 regression Damn, why it stops working?
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy