|
|
@ -557,7 +557,7 @@ func SetDefaultBranch(ctx *macaron.Context) { |
|
|
|
if !git.IsErrUnsupportedVersion(err) { |
|
|
|
if !git.IsErrUnsupportedVersion(err) { |
|
|
|
gitRepo.Close() |
|
|
|
gitRepo.Close() |
|
|
|
ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ |
|
|
|
ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ |
|
|
|
"Err": fmt.Sprintf("Unable to set default branch onrepository: %s/%s Error: %v", ownerName, repoName, err), |
|
|
|
"Err": fmt.Sprintf("Unable to set default branch on repository: %s/%s Error: %v", ownerName, repoName, err), |
|
|
|
}) |
|
|
|
}) |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
@ -566,7 +566,7 @@ func SetDefaultBranch(ctx *macaron.Context) { |
|
|
|
|
|
|
|
|
|
|
|
if err := repo.UpdateDefaultBranch(); err != nil { |
|
|
|
if err := repo.UpdateDefaultBranch(); err != nil { |
|
|
|
ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ |
|
|
|
ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ |
|
|
|
"Err": fmt.Sprintf("Unable to set default branch onrepository: %s/%s Error: %v", ownerName, repoName, err), |
|
|
|
"Err": fmt.Sprintf("Unable to set default branch on repository: %s/%s Error: %v", ownerName, repoName, err), |
|
|
|
}) |
|
|
|
}) |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|