← All procedures

git.stash.list

List all stashes

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

From the command line

$ mark git stash list

As data, in a program

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

Input

FieldTypeRequiredDefaultDescription
cwdstringnoWorking directory (default: process.cwd())

Output

FieldTypeRequiredDefaultDescription
stashesobject[]yesThe stashes
countnumberyesThe number of stashes
JSON Schemas
{
  "input": {
    "type": "object",
    "properties": {
      "cwd": {
        "description": "Working directory (default: process.cwd())",
        "type": "string"
      }
    }
  },
  "output": {
    "type": "object",
    "properties": {
      "stashes": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "index": {
              "type": "number",
              "description": "The stash index (0 is the newest)"
            },
            "ref": {
              "type": "string",
              "description": "The stash reference, for example stash@{0}"
            },
            "hash": {
              "type": "string",
              "description": "The commit hash of the stash"
            },
            "message": {
              "type": "string",
              "description": "The stash message"
            }
          },
          "required": [
            "index",
            "ref",
            "hash",
            "message"
          ],
          "additionalProperties": {}
        },
        "description": "The stashes"
      },
      "count": {
        "type": "number",
        "description": "The number of stashes"
      }
    },
    "required": [
      "stashes",
      "count"
    ],
    "additionalProperties": {}
  }
}