diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2020-10-31 23:42:54 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-31 23:42:54 +0800 |
commit | a420beda2a12f25f5f5503c20d0d6febee892132 (patch) | |
tree | 2c2ffd8fd58965e0b6ef9c615d6fb9556a658441 /modules | |
parent | 7cb22d6439f86346f92f5711f498b7623245071c (diff) | |
download | gitea-a420beda2a12f25f5f5503c20d0d6febee892132.tar.gz gitea-a420beda2a12f25f5f5503c20d0d6febee892132.zip |
Fix a bug on refactoring (#13373)
Diffstat (limited to 'modules')
-rw-r--r-- | modules/repository/push.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/repository/push.go b/modules/repository/push.go index 04dd63a2cc..e349b51094 100644 --- a/modules/repository/push.go +++ b/modules/repository/push.go @@ -5,11 +5,10 @@ package repository import ( - "path/filepath" "strings" + "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/git" - "code.gitea.io/gitea/modules/setting" ) // PushUpdateOptions defines the push update options @@ -105,7 +104,7 @@ func IsForcePush(opts *PushUpdateOptions) (bool, error) { } output, err := git.NewCommand("rev-list", "--max-count=1", opts.OldCommitID, "^"+opts.NewCommitID). - RunInDir(filepath.Join(setting.RepoRootPath, opts.RepoUserName, opts.RepoName)) + RunInDir(models.RepoPath(opts.RepoUserName, opts.RepoName)) if err != nil { return false, err } else if len(output) > 0 { |