← All procedures

git.stash.pop

Pop stash (apply and remove)

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

From the command line

$ mark git stash pop

As data, in a program

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

Input

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

Output

FieldTypeRequiredDefaultDescription
appliedbooleanyesTrue when the stash was applied
refstringyesThe stash reference
droppedbooleanyesTrue when the stash was dropped (false after a conflict)
conflictbooleannoTrue when the stash had a merge conflict
JSON Schemas
{
  "input": {
    "type": "object",
    "properties": {
      "index": {
        "description": "Stash index to pop (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"
      },
      "dropped": {
        "type": "boolean",
        "description": "True when the stash was dropped (false after a conflict)"
      },
      "conflict": {
        "description": "True when the stash had a merge conflict",
        "type": "boolean"
      }
    },
    "required": [
      "applied",
      "ref",
      "dropped"
    ],
    "additionalProperties": {}
  }
}