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:
fixfon
2026-10-16 08:19:57 +00:00
committed by GitHub
co-authored by wxiaoguang
parent 70a5ff725c
commit 217300fff7
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)