+6
appview/state/state.go
+6
appview/state/state.go
···
263
263
return nil
264
264
}
265
265
266
+
func stripGitExt(name string) string {
267
+
return strings.TrimSuffix(name, ".git")
268
+
}
269
+
266
270
func (s *State) NewRepo(w http.ResponseWriter, r *http.Request) {
267
271
switch r.Method {
268
272
case http.MethodGet:
···
297
301
s.pages.Notice(w, "repo", err.Error())
298
302
return
299
303
}
304
+
305
+
repoName = stripGitExt(repoName)
300
306
301
307
defaultBranch := r.FormValue("branch")
302
308
if defaultBranch == "" {