summaryrefslogtreecommitdiffstats
path: root/services/asymkey
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2022-02-06 20:01:47 +0100
committerGitHub <noreply@github.com>2022-02-06 20:01:47 +0100
commit3043eb36bfcd7ddf29202b958b91942826a8182b (patch)
treef6bfcb38648f07ff8132558ff826b8b1aac003ec /services/asymkey
parent8ae5e6d7fdd577ebf0807bf33a4cdeef35d254d9 (diff)
downloadgitea-3043eb36bfcd7ddf29202b958b91942826a8182b.tar.gz
gitea-3043eb36bfcd7ddf29202b958b91942826a8182b.zip
Delete old git.NewCommand() and use it as git.NewCommandContext() (#18552)
Diffstat (limited to 'services/asymkey')
-rw-r--r--services/asymkey/sign.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/services/asymkey/sign.go b/services/asymkey/sign.go
index c93863a8fd..c2c6829d61 100644
--- a/services/asymkey/sign.go
+++ b/services/asymkey/sign.go
@@ -90,15 +90,15 @@ func SigningKey(ctx context.Context, repoPath string) (string, *git.Signature) {
if setting.Repository.Signing.SigningKey == "default" || setting.Repository.Signing.SigningKey == "" {
// Can ignore the error here as it means that commit.gpgsign is not set
- value, _ := git.NewCommandContext(ctx, "config", "--get", "commit.gpgsign").RunInDir(repoPath)
+ value, _ := git.NewCommand(ctx, "config", "--get", "commit.gpgsign").RunInDir(repoPath)
sign, valid := git.ParseBool(strings.TrimSpace(value))
if !sign || !valid {
return "", nil
}
- signingKey, _ := git.NewCommandContext(ctx, "config", "--get", "user.signingkey").RunInDir(repoPath)
- signingName, _ := git.NewCommandContext(ctx, "config", "--get", "user.name").RunInDir(repoPath)
- signingEmail, _ := git.NewCommandContext(ctx, "config", "--get", "user.email").RunInDir(repoPath)
+ signingKey, _ := git.NewCommand(ctx, "config", "--get", "user.signingkey").RunInDir(repoPath)
+ signingName, _ := git.NewCommand(ctx, "config", "--get", "user.name").RunInDir(repoPath)
+ signingEmail, _ := git.NewCommand(ctx, "config", "--get", "user.email").RunInDir(repoPath)
return strings.TrimSpace(signingKey), &git.Signature{
Name: strings.TrimSpace(signingName),
Email: strings.TrimSpace(signingEmail),