claude-code / mods /diff /hooks /git /parse /is-whole-answer /is-whole-answer.ts
SaylorTwift's picture
SaylorTwift HF Staff
Add files using upload-large-folder tool
00080b0 verified
Raw History Blame Contribute Delete
408 Bytes
import type Types from '../../types'
import { isWholeListing } from '../is-whole-listing'
/**
* Whether a `-z` git child both succeeded and answered a whole listing,
* so its stdout may be parsed (isWholeListing).
*
* @param result what the child left
* @returns whether to parse it
*/
export const isWholeAnswer = (result: Types.RunResult) =>
result.exitCode === 0 && isWholeListing(result.stdout)