This repository was archived by the owner on Sep 3, 2025. It is now read-only.
git-bundle-web-server: simple web-server process#6
Merged
derrickstolee merged 2 commits intomainfrom Sep 21, 2022
Merged
Conversation
dscho
approved these changes
Aug 30, 2022
dscho
left a comment
There was a problem hiding this comment.
Nice! I might learn me some Go just by reviewing your PRs. 🤣
git-bundle-web-server: simple web-server process
mjcheetham
approved these changes
Sep 20, 2022
cmd/git-bundle-web-server/main.go
Outdated
|
|
||
| slash1 := strings.Index(path, "/") | ||
| if slash1 < 0 { | ||
| return "", "", "", fmt.Errorf("route has organization, but no repo") |
Collaborator
There was a problem hiding this comment.
nit: I think the preferred term in owner rather than organization, no? :-)
Collaborator
Author
There was a problem hiding this comment.
I've always thought of it as org/repo (where org can be a user). But I'll take your word for it because I expect you've thought about this a lot more than I have.
0def069 to
8d68353
Compare
8d2e00b to
2d7e0d7
Compare
Use core.GetRepositories() to track which routes are available. Use a
basic form of {org}/{repo}[/[{file}]] route parsing. If {file} is blank,
then serve "bundle-list"
8d68353 to
a484643
Compare
2d7e0d7 to
59b391a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
git-bundle-web-serverprocess runs the server process. It performs a very basic form of routing to ensure that the input route is still in theroutesfile, then serves thebundle-listor the requested.bundlefile.