mirror of
https://github.com/go-gitea/gitea.git
synced 2026-11-21 14:48:26 +00:00
Backport #29938 Try to fix #29936 Far from ideal, but still better than panic.
This commit is contained in:
1 parent
3fd15aeff2
commit
b4a6c6fd7a
2 files changed
+7
-5
No files matched your search
+1
-1
@@ -248,7 +248,7 @@ type DivergeObject struct {
|
||||
// GetDivergingCommits returns the number of commits a targetBranch is ahead or behind a baseBranch
|
||||
func GetDivergingCommits(ctx context.Context, repoPath, baseBranch, targetBranch string) (do DivergeObject, err error) {
|
||||
cmd := NewCommand(ctx, "rev-list", "--count", "--left-right").
|
||||
AddDynamicArguments(baseBranch + "..." + targetBranch)
|
||||
AddDynamicArguments(baseBranch + "..." + targetBranch).AddArguments("--")
|
||||
stdout, _, err := cmd.RunStdString(&RunOpts{Dir: repoPath})
|
||||
if err != nil {
|
||||
return do, err
|
||||
|
||||
Reference in new issue
Block a user