MCPcopy Create free account
hub / github.com/angular/dev-infra / hasUncommittedChanges

Method hasUncommittedChanges

ng-dev/utils/git/git-client.ts:168–177  ·  view source on GitHub ↗

Gets whether the current Git repository has uncommitted changes.

()

Source from the content-addressed store, hash-verified

166 }
167
168 Log.debug('Stdout:', result.stdout ? this.sanitizeConsoleOutput(result.stdout) : result.stdout);
169 Log.debug('Stderr:', result.stderr ? this.sanitizeConsoleOutput(result.stderr) : result.stderr);
170
171 if (result.error !== undefined) {
172 Log.debug('Process Error:', this.sanitizeConsoleOutput(result.error.message));
173 if (result.error.stack) {
174 Log.debug('Process Error Stack:', this.sanitizeConsoleOutput(result.error.stack));
175 }
176 // Git sometimes prints the command if it failed. This means that it could
177 // potentially leak the Github token used for accessing the remote. To avoid
178 // printing a token, we sanitize the string before printing the stderr output.
179 process.stderr.write(this.sanitizeConsoleOutput(result.error.message));
180 }

Callers 8

hasLocalChangesFunction · 0.80
rebasePrFunction · 0.80
mergeMethod · 0.80
checkoutPullRequestFunction · 0.80

Calls 1

runGracefulMethod · 0.95

Tested by

no test coverage detected