aboutsummaryrefslogtreecommitdiffstats
path: root/services/repository/create.go
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2024-12-20 12:17:14 +0800
committerGitHub <noreply@github.com>2024-12-20 12:17:14 +0800
commit52b319bc00712da095ee4121b616be232b1e455b (patch)
treee509235780bab858e43023247f82d1c956c71bf1 /services/repository/create.go
parentc66de245c4603c8426273f98af1a0c4d2855a677 (diff)
downloadgitea-52b319bc00712da095ee4121b616be232b1e455b.tar.gz
gitea-52b319bc00712da095ee4121b616be232b1e455b.zip
Refactor pprof labels and process desc (#32909)
* Deprecate "gopid" in log, it is not useful and requires very hacky approach * Remove "git.Command.SetDescription" because it is not useful and only makes the logs too flexible
Diffstat (limited to 'services/repository/create.go')
-rw-r--r--services/repository/create.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/services/repository/create.go b/services/repository/create.go
index 14e625d962..a3199f2a40 100644
--- a/services/repository/create.go
+++ b/services/repository/create.go
@@ -68,7 +68,6 @@ func prepareRepoCommit(ctx context.Context, repo *repo_model.Repository, tmpDir,
// Clone to temporary path and do the init commit.
if stdout, _, err := git.NewCommand(ctx, "clone").AddDynamicArguments(repoPath, tmpDir).
- SetDescription(fmt.Sprintf("prepareRepoCommit (git clone): %s to %s", repoPath, tmpDir)).
RunStdString(&git.RunOpts{Dir: "", Env: env}); err != nil {
log.Error("Failed to clone from %v into %s: stdout: %s\nError: %v", repo, tmpDir, stdout, err)
return fmt.Errorf("git clone: %w", err)
@@ -301,7 +300,6 @@ func CreateRepositoryDirectly(ctx context.Context, doer, u *user_model.User, opt
}
if stdout, _, err := git.NewCommand(ctx, "update-server-info").
- SetDescription(fmt.Sprintf("CreateRepository(git update-server-info): %s", repoPath)).
RunStdString(&git.RunOpts{Dir: repoPath}); err != nil {
log.Error("CreateRepository(git update-server-info) in %v: Stdout: %s\nError: %v", repo, stdout, err)
rollbackRepo = repo
@@ -314,9 +312,7 @@ func CreateRepositoryDirectly(ctx context.Context, doer, u *user_model.User, opt
if len(opts.License) > 0 {
licenses = append(licenses, ConvertLicenseName(opts.License))
- stdout, _, err := git.NewCommand(ctx, "rev-parse", "HEAD").
- SetDescription(fmt.Sprintf("CreateRepository(git rev-parse HEAD): %s", repoPath)).
- RunStdString(&git.RunOpts{Dir: repoPath})
+ stdout, _, err := git.NewCommand(ctx, "rev-parse", "HEAD").RunStdString(&git.RunOpts{Dir: repoPath})
if err != nil {
log.Error("CreateRepository(git rev-parse HEAD) in %v: Stdout: %s\nError: %v", repo, stdout, err)
rollbackRepo = repo