MCPcopy
hub / github.com/desktop/desktop / getSubmoduleDiff

Function getSubmoduleDiff

app/test/unit/git/diff-test.ts:512–519  ·  view source on GitHub ↗
(repository: Repository)

Source from the content-addressed store, hash-verified

510 }
511
512 const getSubmoduleDiff = async (repository: Repository) => {
513 const status = await getStatusOrThrow(repository)
514 const file = status.workingDirectory.files[0]
515 const diff = await getWorkingDirectoryDiff(repository, file)
516 assert.equal(diff.kind, DiffType.Submodule)
517
518 return diff as ISubmoduleDiff
519 }
520
521 it('can get the diff for a submodule with the right paths', async t => {
522 const repoPath = await setupFixtureRepository(t, 'submodule-basic-setup')

Callers 1

diff-test.tsFile · 0.85

Calls 2

getStatusOrThrowFunction · 0.90
getWorkingDirectoryDiffFunction · 0.90

Tested by

no test coverage detected