← All procedures
git.stash.import
Import stash from patch
CLI- Package
- @procedures/git · README
- Path
["git","stash","import"]- CLI
mark git stash import --patch <string>- As data
{"$proc":["git","stash","import"],"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","import"], { patch: "<patch>" });
console.log(JSON.stringify(result));From the command line
$ mark git stash import --patch <string>
As data, in a program
{ "$proc": ["git", "stash", "import"], "input": { "patch": "<patch>" } }Input
| Field | Type | Required | Default | Description |
|---|
patch | string | yes | | Patch content to apply and stash |
message | string | no | | Message for the new stash |
includeUntracked | boolean | no | | Include untracked files (default: false) |
cwd | string | no | | Working directory |
Output
| Field | Type | Required | Default | Description |
|---|
imported | boolean | yes | | True when the import succeeded |
ref | string | no | | The new stash reference |
error | string | no | | Why the import failed |
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"patch": {
"type": "string",
"description": "Patch content to apply and stash"
},
"message": {
"description": "Message for the new stash",
"type": "string"
},
"includeUntracked": {
"description": "Include untracked files (default: false)",
"type": "boolean"
},
"cwd": {
"description": "Working directory",
"type": "string"
}
},
"required": [
"patch"
]
},
"output": {
"type": "object",
"properties": {
"imported": {
"type": "boolean",
"description": "True when the import succeeded"
},
"ref": {
"description": "The new stash reference",
"type": "string"
},
"error": {
"description": "Why the import failed",
"type": "string"
}
},
"required": [
"imported"
],
"additionalProperties": {}
}
}