mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-19 16:18:11 +00:00
fix(pull): fix code context of review comments on unchanged lines (#39799)
Fixes #39794 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -27,6 +27,7 @@ type FastImportFile struct {
|
||||
|
||||
type FastImportCommit struct {
|
||||
Ref string
|
||||
Parent string
|
||||
Message string
|
||||
Files []FastImportFile
|
||||
|
||||
@@ -72,6 +73,9 @@ func ForceFastImport(ctx context.Context, repo RepositoryFacade, commits []FastI
|
||||
|
||||
msg := util.IfZero(c.Message, fmt.Sprintf("test commit %d", i+1))
|
||||
_, _ = fmt.Fprintf(buf, "data %d\n%s\n", len(msg), msg)
|
||||
if c.Parent != "" {
|
||||
_, _ = fmt.Fprintf(buf, "from %s\n", c.Parent)
|
||||
}
|
||||
|
||||
for _, f := range c.Files {
|
||||
mode := util.IfZero(f.Mode, EntryModeBlob)
|
||||
|
||||
Reference in New Issue
Block a user