mirror of
https://github.com/go-gitea/gitea.git
synced 2025-06-22 14:08:01 +02:00
update code.gitea.io/git (#450)
This commit is contained in:

committed by
Thomas Boerger

parent
0c5c34d7dd
commit
47a7529d96
@ -494,12 +494,12 @@ func CommitRepoAction(opts CommitRepoActionOptions) error {
|
||||
isNewBranch := false
|
||||
opType := ActionCommitRepo
|
||||
// Check it's tag push or branch.
|
||||
if strings.HasPrefix(opts.RefFullName, git.TAG_PREFIX) {
|
||||
if strings.HasPrefix(opts.RefFullName, git.TagPrefix) {
|
||||
opType = ActionPushTag
|
||||
opts.Commits = &PushCommits{}
|
||||
} else {
|
||||
// if not the first commit, set the compare URL.
|
||||
if opts.OldCommitID == git.EMPTY_SHA {
|
||||
if opts.OldCommitID == git.EmptySHA {
|
||||
isNewBranch = true
|
||||
} else {
|
||||
opts.Commits.CompareURL = repo.ComposeCompareURL(opts.OldCommitID, opts.NewCommitID)
|
||||
|
Reference in New Issue
Block a user