You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Errors greater than 128 means that the process was killed by an OS signal (see https://unix.stackexchange.com/questions/99112/default-exit-code-when-process-is-terminated)
283
-
log.Warn("It appears that the git process %s has crashed. Attempting to forcbily unlock it [repo: %s]", exitError.Pid(), opts.Dir)
log.Error("Error while trying to unlock repository at %v", err)
291
+
}
292
+
}
293
+
}
294
+
295
+
funchasGitProcessCrashed(errerror) bool {
296
+
ifexitError, ok:=err.(*exec.ExitError); ok {
297
+
ifruntime.GOOS=="windows" {
298
+
log.Warn("Cannot realiably detected if the git process has crashed in windows. Assuming it hasn't [exitCode: %s, pid: %s]", exitError.ExitCode(), exitError.Pid())
299
+
returnfalse
300
+
}
301
+
returnexitError.ExitCode() >128
302
+
}
303
+
// This function should only be called with an ExitError
304
+
log.Error("hasGitProcessCrashed should only be called with an ExitError [err: %v]. Assuming it the git process hasn't crashed", err)
0 commit comments