(cwd, args, maxBytes)
| 37 | } |
| 38 | |
| 39 | function measureGitOutputBytes(cwd, args, maxBytes) { |
| 40 | const result = git(cwd, args, { maxBuffer: maxBytes + 1 }); |
| 41 | if (result.error && /** @type {NodeJS.ErrnoException} */ (result.error).code === "ENOBUFS") { |
| 42 | return maxBytes + 1; |
| 43 | } |
| 44 | if (result.error) { |
| 45 | throw result.error; |
| 46 | } |
| 47 | if (result.status !== 0) { |
| 48 | throw new Error(formatCommandFailure(result)); |
| 49 | } |
| 50 | return Buffer.byteLength(result.stdout, "utf8"); |
| 51 | } |
| 52 | |
| 53 | function measureCombinedGitOutputBytes(cwd, argSets, maxBytes) { |
| 54 | let totalBytes = 0; |
no test coverage detected