Add PushCommit

This commit is contained in:
Lunny Xiao 2014-03-29 19:29:52 +08:00
parent f48fc24670
commit a726c125b5
3 changed files with 18 additions and 9 deletions

View file

@ -276,11 +276,9 @@ func Http(ctx *middleware.Context, params martini.Params) {
}
prefix := path.Join("/", username, params["reponame"])
server := &webdav.Server{
Fs: webdav.Dir(models.RepoPath(username, reponame)),
TrimPrefix: prefix,
Listings: true,
}
server := webdav.NewServer(
models.RepoPath(username, reponame),
prefix, true)
server.ServeHTTP(ctx.ResponseWriter, ctx.Req)
}