fix(pull): fix code context of review comments on unchanged lines (#39799) (#39805)

Backport #39799

Fixes #39794

Co-authored-by: fixfon <12512757+fixfon@users.noreply.github.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Giteabot
2026-10-16 11:53:17 +00:00
committed by GitHub
co-authored by fixfon wxiaoguang
parent 96cb6cd16f
commit c4e9d96162
3 changed files with 68 additions and 3 deletions
+4
View File
@@ -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)