← All procedures
git.stash.export
Export stash as patch for snapshot storage
CLI- Package
- @procedures/git · README
- Path
["git","stash","export"]- CLI
mark git stash export- As data
{"$proc":["git","stash","export"],"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","stash","export"], {});
console.log(JSON.stringify(result));From the command line
$ mark git stash export
As data, in a program
{ "$proc": ["git", "stash", "export"], "input": {} }Input
| Field | Type | Required | Default | Description |
|---|
index | number | no | | Stash index to export (default: 0 = most recent) |
cwd | string | no | | Working directory |
Output
| Field | Type | Required | Default | Description |
|---|
ref | string | yes | | The stash reference |
hash | string | yes | | The commit hash of the stash |
message | string | yes | | The stash message |
patch | string | yes | | The patch of the tracked changes |
hasUntracked | boolean | yes | | True when the stash has untracked files |
untrackedPatch | string | no | | The patch of the untracked files |
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"index": {
"description": "Stash index to export (default: 0 = most recent)",
"type": "number"
},
"cwd": {
"description": "Working directory",
"type": "string"
}
}
},
"output": {
"type": "object",
"properties": {
"ref": {
"type": "string",
"description": "The stash reference"
},
"hash": {
"type": "string",
"description": "The commit hash of the stash"
},
"message": {
"type": "string",
"description": "The stash message"
},
"patch": {
"type": "string",
"description": "The patch of the tracked changes"
},
"hasUntracked": {
"type": "boolean",
"description": "True when the stash has untracked files"
},
"untrackedPatch": {
"description": "The patch of the untracked files",
"type": "string"
}
},
"required": [
"ref",
"hash",
"message",
"patch",
"hasUntracked"
],
"additionalProperties": {}
}
}