[git.branch.list]

git.branch.list is a slot in the git namespace, in Hyperlambda, the language of Magic Cloud. Returns every branch in the local repository, marking which one is currently checked out.

  • Value (git-repo-path), required: Repository path
  • Returns: Returns one unnamed child node per git branch name

Arguments

Required arguments come first, then the optional ones in the order they are declared.

Argument Type Required Description
[remote] bool no List remote branches. Default: false.
[all] bool no List all branches. Default: false.

Guide: How to use [git.branch.list]

JSON declaration

This is the complete declaration of git.branch.list, as the running system describes it. It is also published as slot.json.

JSON declaration
{
  "name": "git.branch.list",
  "description": "Returns every branch in the local repository, marking which one is currently checked out",
  "signature": {
    "input": {
      "kind": "git-repo-path",
      "description": "Repository path",
      "required": true,
      "mode": "ValueOrExpression"
    },
    "children": {
      "remote": {
        "type": "bool",
        "description": "List remote branches",
        "required": false,
        "mode": "ValueOrExpression",
        "cardinality": "ZeroOrOne",
        "default": "false",
        "role": "Option",
        "projection": "Value"
      },
      "all": {
        "type": "bool",
        "description": "List all branches",
        "required": false,
        "mode": "ValueOrExpression",
        "cardinality": "ZeroOrOne",
        "default": "false",
        "role": "Option",
        "projection": "Value"
      }
    },
    "output": {
      "mode": "Lambda",
      "kind": "git-branch-list,string-list",
      "element-kind": "git-branch,text",
      "description": "Returns one unnamed child node per git branch name"
    }
  }
}

all git.* slots git.checkout →