diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2024-03-20 16:38:22 +0100 |
---|---|---|
committer | Earl Warren <contact@earl-warren.org> | 2024-03-26 19:04:26 +0100 |
commit | 0710de9d0d5b6626c08af3430c0429f0b4df1cc7 (patch) | |
tree | c3bf0c453492eba0b83445d0eed94ff860610587 /modules | |
parent | Remove the negative margin from `.page-content` (#29922) (diff) | |
download | forgejo-0710de9d0d5b6626c08af3430c0429f0b4df1cc7.tar.xz forgejo-0710de9d0d5b6626c08af3430c0429f0b4df1cc7.zip |
Fix loadOneBranch panic (#29938)
Try to fix #29936
Far from ideal, but still better than panic.
(cherry picked from commit 21151474e36eecc5b808963b924cd27ec34e0608)
Diffstat (limited to 'modules')
-rw-r--r-- | modules/git/repo.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/git/repo.go b/modules/git/repo.go index 60078f3273..e8a7016d99 100644 --- a/modules/git/repo.go +++ b/modules/git/repo.go @@ -283,7 +283,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 |