aboutsummaryrefslogtreecommitdiff
path: root/internal/db/repo.go
diff options
context:
space:
mode:
authorJoe Chen <jc@unknwon.io>2022-10-23 19:15:14 +0800
committerGitHub <noreply@github.com>2022-10-23 19:15:14 +0800
commitc58c89362161718e1079b9d43c0ce984bb1506cc (patch)
tree14a54295b60b4c2887f06bfde8b7e603e0f4d6dd /internal/db/repo.go
parentef0388045f8fd35a40b3404deb3caa1a37e103f7 (diff)
refactor(db): migrate password methods off `user.go` (#7205)
Diffstat (limited to 'internal/db/repo.go')
-rw-r--r--internal/db/repo.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/internal/db/repo.go b/internal/db/repo.go
index 97228015..7c307144 100644
--- a/internal/db/repo.go
+++ b/internal/db/repo.go
@@ -1040,7 +1040,15 @@ func initRepository(e Engine, repoPath string, doer *User, repo *Repository, opt
}
// Apply changes and commit.
- if err = initRepoCommit(tmpDir, doer.NewGitSig()); err != nil {
+ err = initRepoCommit(
+ tmpDir,
+ &git.Signature{
+ Name: doer.DisplayName(),
+ Email: doer.Email,
+ When: time.Now(),
+ },
+ )
+ if err != nil {
return fmt.Errorf("initRepoCommit: %v", err)
}
}