@davmash/bygone 0.10.1 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -45,11 +45,13 @@ var import_child_process = require("child_process");
45
45
  var fs = __toESM(require("fs"));
46
46
  var path = __toESM(require("path"));
47
47
  var DEFAULT_GIT_MAX_BUFFER_BYTES = 64 * 1024 * 1024;
48
+ var DEFAULT_GIT_TIMEOUT_MS = 3e4;
48
49
  function createGitRunner(maxBuffer = readGitMaxBuffer()) {
49
50
  return (args, cwd) => (0, import_child_process.execFileSync)("git", [...args], {
50
51
  cwd,
51
52
  encoding: "utf8",
52
53
  maxBuffer,
54
+ timeout: DEFAULT_GIT_TIMEOUT_MS,
53
55
  stdio: ["ignore", "pipe", "pipe"]
54
56
  }).trimEnd();
55
57
  }
@@ -306,6 +308,7 @@ function readGitBlob(repoRoot, commit, relativePath) {
306
308
  cwd: repoRoot,
307
309
  encoding: "buffer",
308
310
  maxBuffer: readGitMaxBuffer(),
311
+ timeout: DEFAULT_GIT_TIMEOUT_MS,
309
312
  stdio: ["ignore", "pipe", "pipe"]
310
313
  });
311
314
  }
@@ -314,6 +317,7 @@ function runGitText(repoRoot, args) {
314
317
  cwd: repoRoot,
315
318
  encoding: "utf8",
316
319
  maxBuffer: readGitMaxBuffer(),
320
+ timeout: DEFAULT_GIT_TIMEOUT_MS,
317
321
  stdio: ["ignore", "pipe", "pipe"]
318
322
  });
319
323
  }