MCPcopy
hub / github.com/peter-evans/create-pull-request / hasDiff

Method hasDiff

src/git-command-manager.ts:230–237  ·  view source on GitHub ↗
(options?: string[])

Source from the content-addressed store, hash-verified

228 }
229
230 async hasDiff(options?: string[]): Promise<boolean> {
231 const args = ['diff', '--quiet']
232 if (options) {
233 args.push(...options)
234 }
235 const output = await this.exec(args, {allowAllExitCodes: true})
236 return output.exitCode === 1
237 }
238
239 async isDirty(untracked: boolean, pathspec?: string[]): Promise<boolean> {
240 const pathspecArgs = pathspec ? ['--', ...pathspec] : []

Callers 2

isDirtyMethod · 0.95
createOrUpdateBranchFunction · 0.80

Calls 2

execMethod · 0.95
pushMethod · 0.80

Tested by

no test coverage detected