Browse Source

fix 1608

tags/V1.22.3.1^2
lewis 3 years ago
parent
commit
f2650f13a5
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      routers/private/hook.go

+ 4
- 4
routers/private/hook.go View File

@@ -416,6 +416,10 @@ func HookPostReceive(ctx *macaron.Context, opts private.HookOptions) {
copy(updates[1:], updates) copy(updates[1:], updates)
updates[0] = &option updates[0] = &option
} }

if err := updateRepoCommitCnt(ctx, repo); err != nil {
log.Error("updateRepoCommitCnt failed:%v", err.Error(), ctx.Data["MsgID"])
}
} }
} }


@@ -521,10 +525,6 @@ func HookPostReceive(ctx *macaron.Context, opts private.HookOptions) {
} }
} }


if err := updateRepoCommitCnt(ctx, repo); err != nil {
log.Error("updateRepoCommitCnt failed:%v", err.Error(), ctx.Data["MsgID"])
}

ctx.JSON(http.StatusOK, private.HookPostReceiveResult{ ctx.JSON(http.StatusOK, private.HookPostReceiveResult{
Results: results, Results: results,
RepoWasEmpty: wasEmpty, RepoWasEmpty: wasEmpty,


Loading…
Cancel
Save