mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-22 10:38:30 -04:00
Monitor all git commands; move blame to git package and replace git as a variable (#6864)
* monitor all git commands; move blame to git package and replace git as a variable * use git command but not other commands * fix build * move exec.Command to git.NewCommand * fix fmt * remove unrelated changes * remove unrelated changes * refactor IsEmpty and add tests * fix tests * fix tests * fix tests * fix tests * remove gitLogger * fix fmt * fix isEmpty * fix lint * fix tests
This commit is contained in:
parent
161e12e157
commit
edc94c7041
34 changed files with 750 additions and 74 deletions
|
@ -216,7 +216,7 @@ func (m *Mirror) runSync() ([]*mirrorSyncResult, bool) {
|
|||
|
||||
_, stderr, err := process.GetManager().ExecDir(
|
||||
timeout, repoPath, fmt.Sprintf("Mirror.runSync: %s", repoPath),
|
||||
"git", gitArgs...)
|
||||
git.GitExecutable, gitArgs...)
|
||||
if err != nil {
|
||||
// sanitize the output, since it may contain the remote address, which may
|
||||
// contain a password
|
||||
|
@ -250,7 +250,7 @@ func (m *Mirror) runSync() ([]*mirrorSyncResult, bool) {
|
|||
if m.Repo.HasWiki() {
|
||||
if _, stderr, err := process.GetManager().ExecDir(
|
||||
timeout, wikiPath, fmt.Sprintf("Mirror.runSync: %s", wikiPath),
|
||||
"git", "remote", "update", "--prune"); err != nil {
|
||||
git.GitExecutable, "remote", "update", "--prune"); err != nil {
|
||||
// sanitize the output, since it may contain the remote address, which may
|
||||
// contain a password
|
||||
message, err := sanitizeOutput(stderr, wikiPath)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue