31 lines
757 B
Diff
31 lines
757 B
Diff
42a43,64
|
|
> // reset ssh wrapper afterwards
|
|
> _gitSSH, gitSSHExists := os.LookupEnv("GIT_SSH")
|
|
> defer func() {
|
|
> if gitSSHExists {
|
|
> os.Setenv("GIT_SSH", _gitSSH)
|
|
> }
|
|
> }()
|
|
>
|
|
> _gitSSHCommand, gitSSHCommandExists := os.LookupEnv("GIT_SSH_COMMAND")
|
|
> defer func() {
|
|
> if gitSSHCommandExists {
|
|
> os.Setenv("GIT_SSH_COMMAND", _gitSSHCommand)
|
|
> }
|
|
> }()
|
|
>
|
|
> _gitSSHVariant, gitSSHVariantExists := os.LookupEnv("GIT_SSH_VARIANT")
|
|
> defer func() {
|
|
> if gitSSHVariantExists {
|
|
> os.Setenv("GIT_SSH_VARIANT", _gitSSHVariant)
|
|
> }
|
|
> }()
|
|
>
|
|
49a72,78
|
|
> }
|
|
>
|
|
> func createHTTPUrl(gitPath string, u *url.URL) *url.URL {
|
|
> // this assumes u contains the HTTP base URL that Gitea is running on
|
|
> u2 := *u
|
|
> u2.Path = gitPath
|
|
> return &u2
|