mirror of
https://github.com/go-gitea/gitea.git
synced 2025-11-12 17:50:02 +01:00
Backport #35861 by @divyun Since 1.25.0, the dates get set to `2001-01-01T00:00:00Z`, when not specified by the caller. Fixes #35860 Co-authored-by: Divyun Raje Vaid <mail@divyun.com>
This commit is contained in:
parent
24189dcced
commit
154d7521a5
@ -369,11 +369,11 @@ func ReqChangeRepoFileOptionsAndCheck(ctx *context.APIContext) {
|
|||||||
},
|
},
|
||||||
Signoff: commonOpts.Signoff,
|
Signoff: commonOpts.Signoff,
|
||||||
}
|
}
|
||||||
if commonOpts.Dates.Author.IsZero() {
|
if changeFileOpts.Dates.Author.IsZero() {
|
||||||
commonOpts.Dates.Author = time.Now()
|
changeFileOpts.Dates.Author = time.Now()
|
||||||
}
|
}
|
||||||
if commonOpts.Dates.Committer.IsZero() {
|
if changeFileOpts.Dates.Committer.IsZero() {
|
||||||
commonOpts.Dates.Committer = time.Now()
|
changeFileOpts.Dates.Committer = time.Now()
|
||||||
}
|
}
|
||||||
ctx.Data["__APIChangeRepoFilesOptions"] = changeFileOpts
|
ctx.Data["__APIChangeRepoFilesOptions"] = changeFileOpts
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user