@@ -279,65 +279,6 @@ func GetAllCommits(ctx *context.APIContext) {
279
279
ctx .JSON (http .StatusOK , & apiCommits )
280
280
}
281
281
282
- // GetAllCommitsStats get all commits via
283
- func GetAllCommitsStats (ctx * context.APIContext ) {
284
- // swagger:operation GET /repos/{owner}/{repo}/commits/stats repository repoGetAllCommitsStats
285
- // ---
286
- // summary: Get a list of all commits stats from a repository
287
- // produces:
288
- // - application/json
289
- // parameters:
290
- // - name: owner
291
- // in: path
292
- // description: owner of the repo
293
- // type: string
294
- // required: true
295
- // - name: repo
296
- // in: path
297
- // description: name of the repo
298
- // type: string
299
- // required: true
300
- // - name: sha
301
- // in: query
302
- // description: SHA or branch to start listing commits from (usually 'master')
303
- // type: string
304
- // responses:
305
- // "200":
306
- // "$ref": "#/responses/CommitList"
307
- // "404":
308
- // "$ref": "#/responses/notFound"
309
- // "409":
310
- // "$ref": "#/responses/EmptyRepository"
311
-
312
- if ctx .Repo .Repository .IsEmpty {
313
- ctx .JSON (http .StatusConflict , api.APIError {
314
- Message : "Git Repository is empty." ,
315
- URL : setting .API .SwaggerURL ,
316
- })
317
- return
318
- }
319
-
320
- sha := ctx .FormString ("sha" )
321
-
322
- var (
323
- commits []* api.ExtendedCommitStats
324
- err error
325
- )
326
-
327
- if len (sha ) == 0 {
328
- sha = ctx .Repo .Repository .DefaultBranch
329
- }
330
-
331
- commits , err = ctx .Repo .GitRepo .ExtendedCommitStats (sha )
332
-
333
- if err != nil {
334
- ctx .Error (http .StatusInternalServerError , "ContributorsCommitStats" , err )
335
- return
336
- }
337
-
338
- ctx .JSON (http .StatusOK , & commits )
339
- }
340
-
341
282
// DownloadCommitDiffOrPatch render a commit's raw diff or patch
342
283
func DownloadCommitDiffOrPatch (ctx * context.APIContext ) {
343
284
// swagger:operation GET /repos/{owner}/{repo}/git/commits/{sha}.{diffType} repository repoDownloadCommitDiffOrPatch
0 commit comments