import execa from 'execa'; export type GitAsyncOptions = Omit & { cwd: string; verbose?: boolean; }; export type GitAsyncResult = ((Omit, 'failed'> & { success: true; }) | (Omit, 'failed'> & { success: false; })) & { errorMessage?: string; }; /** * Run a git command asynchronously. If `verbose` is true, log the command before starting, and display * output on stdout (except in tests) *and* return it in the result. For tests with `verbose`, the output * will be logged all together to `console.log` when the command finishes (for easier mocking/capturing). * * (This utility should potentially be moved to `workspace-tools`, but it uses `execa` to capture * interleaved stdout/stderr, and `execa` is a large-ish dep not currently used there.) */ export declare function gitAsync(args: string[], options: GitAsyncOptions): Promise; export declare function getGitEnv(verbose: boolean | undefined): { /** * If/when to log git commands and output: * - false: never (but return output in result) * - 'live': log command, and pipe output to stdout/stderr (if `verbose` or `process.env.GIT_DEBUG`, except in tests) * - 'end': log command, and log output at the end (for tests, if `verbose` or `process.env.GIT_DEBUG`) */ shouldLog: false | 'live' | 'end'; /** Max buffer for git operations, copied from workspace-tools implementation */ maxBuffer: number; }; //# sourceMappingURL=gitAsync.d.ts.map