mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-04 17:35:21 +02:00
fix: return the correct agit type in ssh_info (#8025)
The git-repo-go tool doesn't understand 'gitea'; it should be 'agit', currently at version 1. Relates-to: <https://github.com/go-gitea/gitea/pull/27014> Fixes: forgejo/forgejo#8024 Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8025 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org> Co-authored-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Co-committed-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
This commit is contained in:
parent
55d8910255
commit
85c054c412
2 changed files with 2 additions and 2 deletions
|
@ -196,7 +196,7 @@ func runServ(ctx context.Context, c *cli.Command) error {
|
||||||
if git.CheckGitVersionAtLeast("2.29") == nil {
|
if git.CheckGitVersionAtLeast("2.29") == nil {
|
||||||
// for AGit Flow
|
// for AGit Flow
|
||||||
if cmd == "ssh_info" {
|
if cmd == "ssh_info" {
|
||||||
fmt.Print(`{"type":"gitea","version":1}`)
|
fmt.Print(`{"type":"agit","version":1}`)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ func SSHInfo(rw http.ResponseWriter, req *http.Request) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
rw.Header().Set("content-type", "text/json;charset=UTF-8")
|
rw.Header().Set("content-type", "text/json;charset=UTF-8")
|
||||||
_, err := rw.Write([]byte(`{"type":"gitea","version":1}`))
|
_, err := rw.Write([]byte(`{"type":"agit","version":1}`))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("fail to write result: err: %v", err)
|
log.Error("fail to write result: err: %v", err)
|
||||||
rw.WriteHeader(http.StatusInternalServerError)
|
rw.WriteHeader(http.StatusInternalServerError)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue