summaryrefslogtreecommitdiffstats
path: root/modules/git/git.go
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2019-11-30 15:40:22 +0100
committerLauris BH <lauris@nix.lv>2019-11-30 15:40:22 +0100
commit60c5339042a605076482320313e8f9498dd72af9 (patch)
treebef1e4a0fb9565140fbf142f13d3b7e5f334031d /modules/git/git.go
parentMake consistent links to repository in the Slack/Mattermost notificiations (#... (diff)
downloadforgejo-60c5339042a605076482320313e8f9498dd72af9.tar.xz
forgejo-60c5339042a605076482320313e8f9498dd72af9.zip
Graceful: Cancel Process on monitor pages & HammerTime (#9213)
* Graceful: Create callbacks to with contexts * Graceful: Say when Gitea is completely finished * Graceful: Git and Process within HammerTime Force all git commands to terminate at HammerTime Force all process commands to terminate at HammerTime Move almost all git processes to run as git Commands * Graceful: Always Hammer after Shutdown * ProcessManager: Add cancel functionality * Fix tests * Make sure that process.Manager.Kill() cancels * Make threadsafe access to Processes and remove own unused Kill * Remove cmd from the process manager as it is no longer used * the default context is the correct context * get rid of double till
Diffstat (limited to 'modules/git/git.go')
-rw-r--r--modules/git/git.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/git/git.go b/modules/git/git.go
index df50eac72a..286e1ad8b4 100644
--- a/modules/git/git.go
+++ b/modules/git/git.go
@@ -6,6 +6,7 @@
package git
import (
+ "context"
"fmt"
"os/exec"
"runtime"
@@ -35,6 +36,9 @@ var (
// Could be updated to an absolute path while initialization
GitExecutable = "git"
+ // DefaultContext is the default context to run git commands in
+ DefaultContext = context.Background()
+
gitVersion string
)