MCPcopy Create free account
hub / github.com/commitizen/cz-cli / isClean

Function isClean

src/commitizen/staging.js:8–19  ·  view source on GitHub ↗

* Asynchrounously determines if the staging area is clean

(repoPath, done, stageAllFiles)

Source from the content-addressed store, hash-verified

6 * Asynchrounously determines if the staging area is clean
7 */
8function isClean (repoPath, done, stageAllFiles) {
9 exec(`git diff --cached --no-ext-diff --name-only ${!!stageAllFiles ? '&& git diff --no-ext-diff --name-only' : ''}`, {
10 maxBuffer: Infinity,
11 cwd: repoPath
12 }, function (error, stdout) {
13 if (error) {
14 return done(error);
15 }
16 let output = stdout || '';
17 done(null, output.trim().length === 0);
18 });
19}

Callers 1

gitCzFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected