← All procedures

git.stash.apply

Apply stash without removing

CLI
Package
@procedures/git · README
Path
["git","stash","apply"]
CLI
mark git stash apply
As data
{"$proc":["git","stash","apply"],"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","apply"], {});
console.log(JSON.stringify(result));

From the command line

$ mark git stash apply

As data, in a program

{ "$proc": ["git", "stash", "apply"], "input": {} }

Input

FieldTypeRequiredDefaultDescription
indexnumbernoStash index to apply (default: 0 = most recent)
cwdstringnoWorking directory

Output

FieldTypeRequiredDefaultDescription
appliedbooleanyesTrue when the stash was applied
refstringyesThe stash reference
conflictbooleannoTrue when the stash had a merge conflict
JSON Schemas
{
  "input": {
    "type": "object",
    "properties": {
      "index": {
        "description": "Stash index to apply (default: 0 = most recent)",
        "type": "number"
      },
      "cwd": {
        "description": "Working directory",
        "type": "string"
      }
    }
  },
  "output": {
    "type": "object",
    "properties": {
      "applied": {
        "type": "boolean",
        "description": "True when the stash was applied"
      },
      "ref": {
        "type": "string",
        "description": "The stash reference"
      },
      "conflict": {
        "description": "True when the stash had a merge conflict",
        "type": "boolean"
      }
    },
    "required": [
      "applied",
      "ref"
    ],
    "additionalProperties": {}
  }
}