Skip to content

Commit c221fd3

Browse files
Merge branch 'main' into pacman-packages
2 parents 9b3a043 + df7f1c2 commit c221fd3

File tree

27 files changed

+1291
-709
lines changed

27 files changed

+1291
-709
lines changed

.eslintrc.yaml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,6 @@ rules:
224224
"@typescript-eslint/await-thenable": [2]
225225
"@typescript-eslint/ban-ts-comment": [2, {'ts-expect-error': false, 'ts-ignore': true, 'ts-nocheck': false, 'ts-check': false}]
226226
"@typescript-eslint/ban-tslint-comment": [0]
227-
"@typescript-eslint/ban-types": [2, {extendDefaults: true, types: {Function: false}}]
228227
"@typescript-eslint/class-literal-property-style": [0]
229228
"@typescript-eslint/class-methods-use-this": [0]
230229
"@typescript-eslint/consistent-generic-constructors": [0]
@@ -255,6 +254,7 @@ rules:
255254
"@typescript-eslint/no-dynamic-delete": [0]
256255
"@typescript-eslint/no-empty-function": [0]
257256
"@typescript-eslint/no-empty-interface": [0]
257+
"@typescript-eslint/no-empty-object-type": [2]
258258
"@typescript-eslint/no-explicit-any": [0]
259259
"@typescript-eslint/no-extra-non-null-assertion": [2]
260260
"@typescript-eslint/no-extraneous-class": [0]
@@ -266,7 +266,7 @@ rules:
266266
"@typescript-eslint/no-invalid-this": [0]
267267
"@typescript-eslint/no-invalid-void-type": [0]
268268
"@typescript-eslint/no-loop-func": [0]
269-
"@typescript-eslint/no-loss-of-precision": [2]
269+
"@typescript-eslint/no-loss-of-precision": [0]
270270
"@typescript-eslint/no-magic-numbers": [0]
271271
"@typescript-eslint/no-meaningless-void-operator": [0]
272272
"@typescript-eslint/no-misused-new": [2]
@@ -278,8 +278,9 @@ rules:
278278
"@typescript-eslint/no-non-null-assertion": [0]
279279
"@typescript-eslint/no-redeclare": [0]
280280
"@typescript-eslint/no-redundant-type-constituents": [2]
281-
"@typescript-eslint/no-require-imports": [0]
281+
"@typescript-eslint/no-require-imports": [2]
282282
"@typescript-eslint/no-restricted-imports": [0]
283+
"@typescript-eslint/no-restricted-types": [0]
283284
"@typescript-eslint/no-shadow": [0]
284285
"@typescript-eslint/no-this-alias": [0] # handled by unicorn/no-this-assignment
285286
"@typescript-eslint/no-unnecessary-boolean-literal-compare": [0]
@@ -294,6 +295,7 @@ rules:
294295
"@typescript-eslint/no-unsafe-call": [0]
295296
"@typescript-eslint/no-unsafe-declaration-merging": [2]
296297
"@typescript-eslint/no-unsafe-enum-comparison": [2]
298+
"@typescript-eslint/no-unsafe-function-type": [2]
297299
"@typescript-eslint/no-unsafe-member-access": [0]
298300
"@typescript-eslint/no-unsafe-return": [0]
299301
"@typescript-eslint/no-unsafe-unary-minus": [2]
@@ -302,7 +304,7 @@ rules:
302304
"@typescript-eslint/no-use-before-define": [0]
303305
"@typescript-eslint/no-useless-constructor": [0]
304306
"@typescript-eslint/no-useless-empty-export": [0]
305-
"@typescript-eslint/no-var-requires": [2]
307+
"@typescript-eslint/no-wrapper-object-types": [2]
306308
"@typescript-eslint/non-nullable-type-assertion-style": [0]
307309
"@typescript-eslint/only-throw-error": [2]
308310
"@typescript-eslint/parameter-properties": [0]
@@ -334,7 +336,7 @@ rules:
334336
"@typescript-eslint/switch-exhaustiveness-check": [0]
335337
"@typescript-eslint/triple-slash-reference": [2]
336338
"@typescript-eslint/typedef": [0]
337-
"@typescript-eslint/unbound-method": [2]
339+
"@typescript-eslint/unbound-method": [0] # too many false-positives
338340
"@typescript-eslint/unified-signatures": [2]
339341
accessor-pairs: [2]
340342
array-callback-return: [2, {checkForEach: true}]
@@ -599,7 +601,7 @@ rules:
599601
no-lone-blocks: [2]
600602
no-lonely-if: [0]
601603
no-loop-func: [0]
602-
no-loss-of-precision: [0] # handled by @typescript-eslint/no-loss-of-precision
604+
no-loss-of-precision: [2]
603605
no-magic-numbers: [0]
604606
no-misleading-character-class: [2]
605607
no-multi-assign: [0]
@@ -843,6 +845,7 @@ rules:
843845
unicorn/no-invalid-fetch-options: [2]
844846
unicorn/no-invalid-remove-event-listener: [2]
845847
unicorn/no-keyword-prefix: [0]
848+
unicorn/no-length-as-slice-end: [2]
846849
unicorn/no-lonely-if: [2]
847850
unicorn/no-magic-array-flat-depth: [0]
848851
unicorn/no-negated-condition: [0]

custom/conf/app.example.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2555,7 +2555,8 @@ LEVEL = Info
25552555
;LIMIT_SIZE_SWIFT = -1
25562556
;; Maximum size of a Vagrant upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
25572557
;LIMIT_SIZE_VAGRANT = -1
2558-
2558+
;; Enable RPM re-signing by default. (It will overwrite the old signature ,using v4 format, not compatible with CentOS 6 or older)
2559+
;DEFAULT_RPM_SIGN_ENABLED = false
25592560
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
25602561
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
25612562
;; default storage for attachments, lfs and avatars

go.mod

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ require (
2222
github.com/PuerkitoBio/goquery v1.9.2
2323
github.com/alecthomas/chroma/v2 v2.14.0
2424
github.com/blakesmith/ar v0.0.0-20190502131153-809d4375e1fb
25-
github.com/blevesearch/bleve/v2 v2.4.0
25+
github.com/blevesearch/bleve/v2 v2.4.2
2626
github.com/buildkite/terminal-to-html/v3 v3.12.1
2727
github.com/caddyserver/certmagic v0.21.3
2828
github.com/chi-middleware/proxy v1.1.1
@@ -147,13 +147,13 @@ require (
147147
github.com/aymerick/douceur v0.2.0 // indirect
148148
github.com/beorn7/perks v1.0.1 // indirect
149149
github.com/bits-and-blooms/bitset v1.13.0 // indirect
150-
github.com/blevesearch/bleve_index_api v1.1.9 // indirect
150+
github.com/blevesearch/bleve_index_api v1.1.10 // indirect
151151
github.com/blevesearch/geo v0.1.20 // indirect
152-
github.com/blevesearch/go-faiss v1.0.19 // indirect
152+
github.com/blevesearch/go-faiss v1.0.20 // indirect
153153
github.com/blevesearch/go-porterstemmer v1.0.3 // indirect
154154
github.com/blevesearch/gtreap v0.1.1 // indirect
155155
github.com/blevesearch/mmap-go v1.0.4 // indirect
156-
github.com/blevesearch/scorch_segment_api/v2 v2.2.14 // indirect
156+
github.com/blevesearch/scorch_segment_api/v2 v2.2.15 // indirect
157157
github.com/blevesearch/segment v0.9.1 // indirect
158158
github.com/blevesearch/snowballstem v0.9.0 // indirect
159159
github.com/blevesearch/upsidedown_store_api v1.0.2 // indirect
@@ -163,7 +163,7 @@ require (
163163
github.com/blevesearch/zapx/v13 v13.3.10 // indirect
164164
github.com/blevesearch/zapx/v14 v14.3.10 // indirect
165165
github.com/blevesearch/zapx/v15 v15.3.13 // indirect
166-
github.com/blevesearch/zapx/v16 v16.1.4 // indirect
166+
github.com/blevesearch/zapx/v16 v16.1.5 // indirect
167167
github.com/boombuler/barcode v1.0.1 // indirect
168168
github.com/bradfitz/gomemcache v0.0.0-20230905024940-24af94b03874 // indirect
169169
github.com/caddyserver/zerossl v0.1.3 // indirect

go.sum

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -117,15 +117,15 @@ github.com/bits-and-blooms/bitset v1.13.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6
117117
github.com/blakesmith/ar v0.0.0-20190502131153-809d4375e1fb h1:m935MPodAbYS46DG4pJSv7WO+VECIWUQ7OJYSoTrMh4=
118118
github.com/blakesmith/ar v0.0.0-20190502131153-809d4375e1fb/go.mod h1:PkYb9DJNAwrSvRx5DYA+gUcOIgTGVMNkfSCbZM8cWpI=
119119
github.com/blevesearch/bleve/v2 v2.0.5/go.mod h1:ZjWibgnbRX33c+vBRgla9QhPb4QOjD6fdVJ+R1Bk8LM=
120-
github.com/blevesearch/bleve/v2 v2.4.0 h1:2xyg+Wv60CFHYccXc+moGxbL+8QKT/dZK09AewHgKsg=
121-
github.com/blevesearch/bleve/v2 v2.4.0/go.mod h1:IhQHoFAbHgWKYavb9rQgQEJJVMuY99cKdQ0wPpst2aY=
120+
github.com/blevesearch/bleve/v2 v2.4.2 h1:NooYP1mb3c0StkiY9/xviiq2LGSaE8BQBCc/pirMx0U=
121+
github.com/blevesearch/bleve/v2 v2.4.2/go.mod h1:ATNKj7Yl2oJv/lGuF4kx39bST2dveX6w0th2FFYLkc8=
122122
github.com/blevesearch/bleve_index_api v1.0.0/go.mod h1:fiwKS0xLEm+gBRgv5mumf0dhgFr2mDgZah1pqv1c1M4=
123-
github.com/blevesearch/bleve_index_api v1.1.9 h1:Cpq0Lp3As0Gfk3+PmcoNDRKeI50C5yuFNpj0YlN/bOE=
124-
github.com/blevesearch/bleve_index_api v1.1.9/go.mod h1:PbcwjIcRmjhGbkS/lJCpfgVSMROV6TRubGGAODaK1W8=
123+
github.com/blevesearch/bleve_index_api v1.1.10 h1:PDLFhVjrjQWr6jCuU7TwlmByQVCSEURADHdCqVS9+g0=
124+
github.com/blevesearch/bleve_index_api v1.1.10/go.mod h1:PbcwjIcRmjhGbkS/lJCpfgVSMROV6TRubGGAODaK1W8=
125125
github.com/blevesearch/geo v0.1.20 h1:paaSpu2Ewh/tn5DKn/FB5SzvH0EWupxHEIwbCk/QPqM=
126126
github.com/blevesearch/geo v0.1.20/go.mod h1:DVG2QjwHNMFmjo+ZgzrIq2sfCh6rIHzy9d9d0B59I6w=
127-
github.com/blevesearch/go-faiss v1.0.19 h1:UKoP8hS7DVsVSRRloNJb4qPfe2UQ99pP4D3oXd23g2A=
128-
github.com/blevesearch/go-faiss v1.0.19/go.mod h1:jrxHrbl42X/RnDPI+wBoZU8joxxuRwedrxqswQ3xfU8=
127+
github.com/blevesearch/go-faiss v1.0.20 h1:AIkdTQFWuZ5LQmKQSebgMR4RynGNw8ZseJXaan5kvtI=
128+
github.com/blevesearch/go-faiss v1.0.20/go.mod h1:jrxHrbl42X/RnDPI+wBoZU8joxxuRwedrxqswQ3xfU8=
129129
github.com/blevesearch/go-porterstemmer v1.0.3 h1:GtmsqID0aZdCSNiY8SkuPJ12pD4jI+DdXTAn4YRcHCo=
130130
github.com/blevesearch/go-porterstemmer v1.0.3/go.mod h1:angGc5Ht+k2xhJdZi511LtmxuEf0OVpvUUNrwmM1P7M=
131131
github.com/blevesearch/gtreap v0.1.1 h1:2JWigFrzDMR+42WGIN/V2p0cUvn4UP3C4Q5nmaZGW8Y=
@@ -134,8 +134,8 @@ github.com/blevesearch/mmap-go v1.0.2/go.mod h1:ol2qBqYaOUsGdm7aRMRrYGgPvnwLe6Y+
134134
github.com/blevesearch/mmap-go v1.0.4 h1:OVhDhT5B/M1HNPpYPBKIEJaD0F3Si+CrEKULGCDPWmc=
135135
github.com/blevesearch/mmap-go v1.0.4/go.mod h1:EWmEAOmdAS9z/pi/+Toxu99DnsbhG1TIxUoRmJw/pSs=
136136
github.com/blevesearch/scorch_segment_api/v2 v2.0.1/go.mod h1:lq7yK2jQy1yQjtjTfU931aVqz7pYxEudHaDwOt1tXfU=
137-
github.com/blevesearch/scorch_segment_api/v2 v2.2.14 h1:fgMLMpGWR7u2TdRm7XSZVWhPvMAcdYHh25Lq1fQ6Fjo=
138-
github.com/blevesearch/scorch_segment_api/v2 v2.2.14/go.mod h1:B7+a7vfpY4NsjuTkpv/eY7RZ91Xr90VaJzT2t7upZN8=
137+
github.com/blevesearch/scorch_segment_api/v2 v2.2.15 h1:prV17iU/o+A8FiZi9MXmqbagd8I0bCqM7OKUYPbnb5Y=
138+
github.com/blevesearch/scorch_segment_api/v2 v2.2.15/go.mod h1:db0cmP03bPNadXrCDuVkKLV6ywFSiRgPFT1YVrestBc=
139139
github.com/blevesearch/segment v0.9.0/go.mod h1:9PfHYUdQCgHktBgvtUOF4x+pc4/l8rdH0u5spnW85UQ=
140140
github.com/blevesearch/segment v0.9.1 h1:+dThDy+Lvgj5JMxhmOVlgFfkUtZV2kw49xax4+jTfSU=
141141
github.com/blevesearch/segment v0.9.1/go.mod h1:zN21iLm7+GnBHWTao9I+Au/7MBiL8pPFtJBJTsk6kQw=
@@ -163,8 +163,8 @@ github.com/blevesearch/zapx/v14 v14.3.10/go.mod h1:qqyuR0u230jN1yMmE4FIAuCxmahRQ
163163
github.com/blevesearch/zapx/v15 v15.2.0/go.mod h1:MmQceLpWfME4n1WrBFIwplhWmaQbQqLQARpaKUEOs/A=
164164
github.com/blevesearch/zapx/v15 v15.3.13 h1:6EkfaZiPlAxqXz0neniq35my6S48QI94W/wyhnpDHHQ=
165165
github.com/blevesearch/zapx/v15 v15.3.13/go.mod h1:Turk/TNRKj9es7ZpKK95PS7f6D44Y7fAFy8F4LXQtGg=
166-
github.com/blevesearch/zapx/v16 v16.1.4 h1:TBQfG77g2UUXwfjOVcEtB9pXkg6JBmGXkeZKI67+TiA=
167-
github.com/blevesearch/zapx/v16 v16.1.4/go.mod h1:+Q+Z89Iv7ewhdX2jyE6Qs/RUnN4tZuokaQ0xvTaFmx8=
166+
github.com/blevesearch/zapx/v16 v16.1.5 h1:b0sMcarqNFxuXvjoXsF8WtwVahnxyhEvBSRJi/AUHjU=
167+
github.com/blevesearch/zapx/v16 v16.1.5/go.mod h1:J4mSF39w1QELc11EWRSBFkPeZuO7r/NPKkHzDCoiaI8=
168168
github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
169169
github.com/boombuler/barcode v1.0.1 h1:NDBbPmhS+EqABEs5Kg3n/5ZNjy73Pz7SIV+KCeqyXcs=
170170
github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=

models/git/branch.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,13 @@ func RenameBranch(ctx context.Context, repo *repo_model.Repository, from, to str
392392
return err
393393
}
394394

395+
// 4.1 Update all not merged pull request head branch name
396+
if _, err = sess.Table("pull_request").Where("head_repo_id=? AND head_branch=? AND has_merged=?",
397+
repo.ID, from, false).
398+
Update(map[string]any{"head_branch": to}); err != nil {
399+
return err
400+
}
401+
395402
// 5. insert renamed branch record
396403
renamedBranch := &RenamedBranch{
397404
RepoID: repo.ID,

models/issues/pull.go

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ type PullRequest struct {
165165
Issue *Issue `xorm:"-"`
166166
Index int64
167167
RequestedReviewers []*user_model.User `xorm:"-"`
168+
RequestedReviewersTeams []*org_model.Team `xorm:"-"`
168169
isRequestedReviewersLoaded bool `xorm:"-"`
169170

170171
HeadRepoID int64 `xorm:"INDEX"`
@@ -305,7 +306,28 @@ func (pr *PullRequest) LoadRequestedReviewers(ctx context.Context) error {
305306
}
306307
pr.isRequestedReviewersLoaded = true
307308
for _, review := range reviews {
308-
pr.RequestedReviewers = append(pr.RequestedReviewers, review.Reviewer)
309+
if review.ReviewerID != 0 {
310+
pr.RequestedReviewers = append(pr.RequestedReviewers, review.Reviewer)
311+
}
312+
}
313+
314+
return nil
315+
}
316+
317+
// LoadRequestedReviewersTeams loads the requested reviewers teams.
318+
func (pr *PullRequest) LoadRequestedReviewersTeams(ctx context.Context) error {
319+
reviews, err := GetReviewsByIssueID(ctx, pr.Issue.ID)
320+
if err != nil {
321+
return err
322+
}
323+
if err = reviews.LoadReviewersTeams(ctx); err != nil {
324+
return err
325+
}
326+
327+
for _, review := range reviews {
328+
if review.ReviewerTeamID != 0 {
329+
pr.RequestedReviewersTeams = append(pr.RequestedReviewersTeams, review.ReviewerTeam)
330+
}
309331
}
310332

311333
return nil

models/issues/review_list.go

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"context"
88

99
"code.gitea.io/gitea/models/db"
10+
organization_model "code.gitea.io/gitea/models/organization"
1011
user_model "code.gitea.io/gitea/models/user"
1112
"code.gitea.io/gitea/modules/container"
1213
"code.gitea.io/gitea/modules/optional"
@@ -37,6 +38,34 @@ func (reviews ReviewList) LoadReviewers(ctx context.Context) error {
3738
return nil
3839
}
3940

41+
// LoadReviewersTeams loads reviewers teams
42+
func (reviews ReviewList) LoadReviewersTeams(ctx context.Context) error {
43+
reviewersTeamsIDs := make([]int64, 0)
44+
for _, review := range reviews {
45+
if review.ReviewerTeamID != 0 {
46+
reviewersTeamsIDs = append(reviewersTeamsIDs, review.ReviewerTeamID)
47+
}
48+
}
49+
50+
teamsMap := make(map[int64]*organization_model.Team, 0)
51+
for _, teamID := range reviewersTeamsIDs {
52+
team, err := organization_model.GetTeamByID(ctx, teamID)
53+
if err != nil {
54+
return err
55+
}
56+
57+
teamsMap[teamID] = team
58+
}
59+
60+
for _, review := range reviews {
61+
if review.ReviewerTeamID != 0 {
62+
review.ReviewerTeam = teamsMap[review.ReviewerTeamID]
63+
}
64+
}
65+
66+
return nil
67+
}
68+
4069
func (reviews ReviewList) LoadIssues(ctx context.Context) error {
4170
issueIDs := container.FilterSlice(reviews, func(review *Review) (int64, bool) {
4271
return review.IssueID, true

models/repo/release.go

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -398,32 +398,6 @@ func GetReleaseAttachments(ctx context.Context, rels ...*Release) (err error) {
398398
return err
399399
}
400400

401-
type releaseSorter struct {
402-
rels []*Release
403-
}
404-
405-
func (rs *releaseSorter) Len() int {
406-
return len(rs.rels)
407-
}
408-
409-
func (rs *releaseSorter) Less(i, j int) bool {
410-
diffNum := rs.rels[i].NumCommits - rs.rels[j].NumCommits
411-
if diffNum != 0 {
412-
return diffNum > 0
413-
}
414-
return rs.rels[i].CreatedUnix > rs.rels[j].CreatedUnix
415-
}
416-
417-
func (rs *releaseSorter) Swap(i, j int) {
418-
rs.rels[i], rs.rels[j] = rs.rels[j], rs.rels[i]
419-
}
420-
421-
// SortReleases sorts releases by number of commits and created time.
422-
func SortReleases(rels []*Release) {
423-
sorter := &releaseSorter{rels: rels}
424-
sort.Sort(sorter)
425-
}
426-
427401
// UpdateReleasesMigrationsByType updates all migrated repositories' releases from gitServiceType to replace originalAuthorID to posterID
428402
func UpdateReleasesMigrationsByType(ctx context.Context, gitServiceType structs.GitServiceType, originalAuthorID string, posterID int64) error {
429403
_, err := db.GetEngine(ctx).Table("release").

modules/git/commit_test.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
package git
55

66
import (
7+
"context"
8+
"os"
79
"path/filepath"
810
"strings"
911
"testing"
@@ -345,3 +347,18 @@ func TestGetCommitFileStatusMerges(t *testing.T) {
345347
assert.Equal(t, commitFileStatus.Removed, expected.Removed)
346348
assert.Equal(t, commitFileStatus.Modified, expected.Modified)
347349
}
350+
351+
func Test_GetCommitBranchStart(t *testing.T) {
352+
bareRepo1Path := filepath.Join(testReposDir, "repo1_bare")
353+
repo, err := OpenRepository(context.Background(), bareRepo1Path)
354+
assert.NoError(t, err)
355+
defer repo.Close()
356+
commit, err := repo.GetBranchCommit("branch1")
357+
assert.NoError(t, err)
358+
assert.EqualValues(t, "2839944139e0de9737a044f78b0e4b40d989a9e3", commit.ID.String())
359+
360+
startCommitID, err := repo.GetCommitBranchStart(os.Environ(), "branch1", commit.ID.String())
361+
assert.NoError(t, err)
362+
assert.NotEmpty(t, startCommitID)
363+
assert.EqualValues(t, "9c9aef8dd84e02bc7ec12641deb4c930a7c30185", startCommitID)
364+
}

modules/git/diff.go

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,17 @@ func CutDiffAroundLine(originalDiff io.Reader, line int64, old bool, numbersOfLi
271271
}
272272

273273
// GetAffectedFiles returns the affected files between two commits
274-
func GetAffectedFiles(repo *Repository, oldCommitID, newCommitID string, env []string) ([]string, error) {
274+
func GetAffectedFiles(repo *Repository, branchName, oldCommitID, newCommitID string, env []string) ([]string, error) {
275+
if oldCommitID == emptySha1ObjectID.String() || oldCommitID == emptySha256ObjectID.String() {
276+
startCommitID, err := repo.GetCommitBranchStart(env, branchName, newCommitID)
277+
if err != nil {
278+
return nil, err
279+
}
280+
if startCommitID == "" {
281+
return nil, fmt.Errorf("cannot find the start commit of %s", newCommitID)
282+
}
283+
oldCommitID = startCommitID
284+
}
275285
stdoutReader, stdoutWriter, err := os.Pipe()
276286
if err != nil {
277287
log.Error("Unable to create os.Pipe for %s", repo.Path)

0 commit comments

Comments
 (0)