← All procedures
git.hasUnstagedChanges
Check if there are any unstaged changes
CLI- Package
- @procedures/git · README
- Path
["git","hasUnstagedChanges"]- CLI
mark git hasUnstagedChanges- As data
{"$proc":["git","hasUnstagedChanges"],"input":{}}
Use it
In TypeScript
import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/git"; // registers its procedures
const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["git","hasUnstagedChanges"], {});
console.log(JSON.stringify(result));From the command line
$ mark git hasUnstagedChanges
As data, in a program
{ "$proc": ["git", "hasUnstagedChanges"], "input": {} }Input
| Field | Type | Required | Default | Description |
|---|
cwd | string | no | | Working directory (default: process.cwd()) |
Output
| Field | Type | Required | Default | Description |
|---|
value | boolean | yes | | The answer of the predicate |
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"cwd": {
"description": "Working directory (default: process.cwd())",
"type": "string"
}
}
},
"output": {
"type": "object",
"properties": {
"value": {
"type": "boolean",
"description": "The answer of the predicate"
}
},
"required": [
"value"
],
"additionalProperties": {}
}
}