Added forks

This commit is contained in:
Thomas Miceli
2023-03-14 23:26:39 +01:00
parent 8630f647c6
commit 1607d8fc93
9 changed files with 235 additions and 86 deletions

View File

@ -53,11 +53,7 @@ func runGitCommand(ch ssh.Channel, gitCmd string, keyID uint) error {
_ = models.SSHKeyLastUsedNow(keyID)
repositoryPath, err := git.GetRepositoryPath(gist.User.Username, gist.Uuid)
if err != nil {
errorSsh("Failed to get repository path", err)
return errors.New("internal server error")
}
repositoryPath := git.RepositoryPath(gist.User.Username, gist.Uuid)
cmd := exec.Command("git", verb, repositoryPath)
cmd.Dir = repositoryPath