-
-
Notifications
You must be signed in to change notification settings - Fork 193
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
New git datasource #661
New git datasource #661
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found some fixes!
P.S. share your ideas, feedbacks or issues with us at https://github.com/fixmie/feedback (this message will be removed after the beta stage).
859b2fc
to
b285c11
Compare
4a1e8ef
to
5dc794e
Compare
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
5dc794e
to
744dfe2
Compare
func (g gitsource) parseArgURL(arg string) (u *url.URL, err error) { | ||
if strings.HasPrefix(arg, "//") { | ||
u, err = url.Parse(arg[1:]) | ||
u.Path = "/" + u.Path | ||
} else { | ||
u, err = url.Parse(arg) | ||
} | ||
|
||
if err != nil { | ||
return nil, fmt.Errorf("failed to parse arg %s: %w", arg, err) | ||
} | ||
return u, err | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is 👍
@hairyhenderson This looks really awesome, thanks for throwing this up. I like where it's heading. |
Thanks @rossedman! 😄 |
Adds support for accessing datasources in git repos. Adds 5 new schemes:
git://
- the git server (as served bygit daemon
and others)git+file://
- git repo on the local filesystem - supports bare repos as wellgit+ssh://
- git over sshgit+http://
,git+https://
- git over http(s)//
is used to separate repo from path, likegit+https://github.com/example/repo//path/to/file.yaml
- the path here is/path/to/file.yaml
. Directories are supported.Signed-off-by: Dave Henderson dhenderson@gmail.com