{
  "id": "quilt",
  "name": "GNU Quilt",
  "homepage": "https://savannah.nongnu.org/projects/quilt",
  "description": "Work with series of patches",
  "executables": [
    "quilt"
  ],
  "dotfiles": {
    "paths": [
      "~/.quiltrc"
    ],
    "secret": []
  },
  "commands": {
    "format": 1,
    "label": "Manage a patch series",
    "description": "The everyday quilt commands: new, add, refresh, push and pop. Other commands are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "subcommand": [
      {
        "path": [
          "new"
        ],
        "label": "Create a patch",
        "description": "Create a new patch after the topmost one.",
        "source": [
          {
            "id": "man",
            "kind": "manual",
            "url": "https://manpages.debian.org/bookworm/quilt/quilt.1.en.html",
            "revision": "0.67",
            "evidence": "  new [-p n|-p ab]\n    {patchname}\n   -p n\n  Create a -p n style patch (-p0 or -p1 are supported).\n"
          }
        ],
        "field": [
          {
            "id": "patchname",
            "label": "Patch name",
            "type": "string",
            "position": 0,
            "sources": [
              "man"
            ]
          },
          {
            "id": "strip",
            "label": "Patch style",
            "description": "-p0 or -p1.",
            "type": "enum",
            "option": [
              "-p"
            ],
            "choices": [
              {
                "value": "0",
                "label": "-p0"
              },
              {
                "value": "1",
                "label": "-p1"
              }
            ],
            "sources": [
              "man"
            ]
          }
        ],
        "task": [
          {
            "id": "new",
            "label": "New patch",
            "fields": [
              "patchname",
              "strip"
            ],
            "required": [
              "patchname"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "patchname",
              "strip"
            ]
          }
        ]
      },
      {
        "path": [
          "add"
        ],
        "label": "Add files to a patch",
        "description": "Files must be added before they are modified.",
        "source": [
          {
            "id": "man",
            "kind": "manual",
            "url": "https://manpages.debian.org/bookworm/quilt/quilt.1.en.html",
            "revision": "0.67",
            "evidence": "  add [-P patch] {file} ...\n    Add one or more files to the topmost or named patch.\n   -P patch\n    Patch to add files to.\n"
          }
        ],
        "field": [
          {
            "id": "files",
            "label": "Files",
            "type": "path",
            "position": 0,
            "multiple": true,
            "path": {
              "kind": "file",
              "role": "input",
              "must_exist": true
            },
            "sources": [
              "man"
            ]
          },
          {
            "id": "patch",
            "label": "Patch",
            "description": "Defaults to the topmost patch.",
            "type": "string",
            "option": [
              "-P"
            ],
            "sources": [
              "man"
            ]
          }
        ],
        "task": [
          {
            "id": "add",
            "label": "Add files",
            "fields": [
              "files",
              "patch"
            ],
            "required": [
              "files"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "files",
              "patch"
            ]
          }
        ]
      },
      {
        "path": [
          "refresh"
        ],
        "label": "Refresh a patch",
        "description": "Regenerate the topmost or named patch from the working tree.",
        "source": [
          {
            "id": "man",
            "kind": "manual",
            "url": "https://manpages.debian.org/bookworm/quilt/quilt.1.en.html",
            "revision": "0.67",
            "evidence": "  refresh [-p\n    n|-p ab] [-u|-U num|-c|-C num] [-z[new_name]] [-f] [--no-timestamps]\n    [--no-index] [--diffstat] [--sort] [--backup] [--strip-trailing-whitespace]\n    [patch]\n   -f\n  Enforce refreshing of a patch that is not on top.\n    --no-timestamps\n    Do not include file timestamps in patch headers.\n    --no-index\n    Do not output Index: lines.\n   --diffstat\n    Add a diffstat section to the patch header, or replace the\n   --backup\n    Create a backup copy of the old version of a patch as\n   --sort\n  Sort files by their name instead of preserving the original order.\n    --strip-trailing-whitespace\n    Strip trailing whitespace at the end of lines.\n"
          }
        ],
        "field": [
          {
            "id": "patch",
            "label": "Patch",
            "description": "Defaults to the topmost patch.",
            "type": "string",
            "position": 0,
            "sources": [
              "man"
            ]
          },
          {
            "id": "no_timestamps",
            "label": "No timestamps",
            "type": "boolean",
            "option": [
              "--no-timestamps"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "no_index",
            "label": "No Index: lines",
            "type": "boolean",
            "option": [
              "--no-index"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "diffstat",
            "label": "Add diffstat",
            "type": "boolean",
            "option": [
              "--diffstat"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "sort",
            "label": "Sort files",
            "type": "boolean",
            "option": [
              "--sort"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "backup",
            "label": "Keep backup",
            "type": "boolean",
            "option": [
              "--backup"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "strip_ws",
            "label": "Strip trailing whitespace",
            "type": "boolean",
            "option": [
              "--strip-trailing-whitespace"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "force",
            "label": "Force (patch not on top)",
            "type": "boolean",
            "option": [
              "-f"
            ],
            "sources": [
              "man"
            ]
          }
        ],
        "task": [
          {
            "id": "refresh",
            "label": "Refresh topmost patch",
            "fields": [
              "no_timestamps",
              "no_index",
              "diffstat"
            ],
            "required": []
          },
          {
            "id": "refresh-named",
            "label": "Refresh named patch",
            "fields": [
              "patch",
              "force",
              "no_timestamps"
            ],
            "required": [
              "patch"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "patch",
              "no_timestamps",
              "no_index",
              "diffstat"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "sort",
              "backup",
              "strip_ws",
              "force"
            ]
          }
        ]
      },
      {
        "path": [
          "push"
        ],
        "label": "Apply patches",
        "description": "Apply the next patch, N patches, or all.",
        "source": [
          {
            "id": "man",
            "kind": "manual",
            "url": "https://manpages.debian.org/bookworm/quilt/quilt.1.en.html",
            "revision": "0.67",
            "evidence": "  push [-afqvm]\n    [--fuzz=N] [--merge[=merge|diff3]] [--leave-rejects]\n    [--color[=always|auto|never]] [--refresh] [num|patch]\n   -a\n  Apply all patches in the series file.\n   -q\n  Quiet operation.\n   -f\n  Force apply, even if the patch has rejects.\n   -v\n  Verbose operation.\n   --fuzz=N\n    Set the maximum fuzz factor (default: 2).\n    --leave-rejects\n    Leave around the reject files patch produced, even if the\n   --refresh\n    Automatically refresh every patch after it was successfully\n"
          }
        ],
        "field": [
          {
            "id": "target",
            "label": "Count or patch name",
            "type": "string",
            "position": 0,
            "sources": [
              "man"
            ]
          },
          {
            "id": "all",
            "label": "Apply all patches",
            "type": "boolean",
            "option": [
              "-a"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "force",
            "label": "Force apply",
            "type": "boolean",
            "option": [
              "-f"
            ],
            "effect": "overwrite",
            "sources": [
              "man"
            ]
          },
          {
            "id": "quiet",
            "label": "Quiet",
            "type": "boolean",
            "option": [
              "-q"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "verbose",
            "label": "Verbose",
            "type": "boolean",
            "option": [
              "-v"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "fuzz",
            "label": "Max fuzz",
            "type": "integer",
            "option": [
              "--fuzz"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "leave_rejects",
            "label": "Leave reject files",
            "type": "boolean",
            "option": [
              "--leave-rejects"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "refresh",
            "label": "Refresh after applying",
            "type": "boolean",
            "option": [
              "--refresh"
            ],
            "sources": [
              "man"
            ]
          }
        ],
        "task": [
          {
            "id": "next",
            "label": "Apply next patch",
            "fields": [
              "target",
              "verbose"
            ],
            "required": []
          },
          {
            "id": "all",
            "label": "Apply all patches",
            "set": {
              "all": [
                true
              ]
            },
            "lock": [
              "all"
            ],
            "fields": [
              "all",
              "verbose",
              "quiet"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "target",
              "all",
              "verbose",
              "quiet"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "force",
              "fuzz",
              "leave_rejects",
              "refresh"
            ]
          }
        ]
      },
      {
        "path": [
          "pop"
        ],
        "label": "Unapply patches",
        "description": "Remove the topmost patch, N patches, or all.",
        "source": [
          {
            "id": "man",
            "kind": "manual",
            "url": "https://manpages.debian.org/bookworm/quilt/quilt.1.en.html",
            "revision": "0.67",
            "evidence": "  pop [-afRqv] [--refresh]\n    [num|patch]\n   -a\n  Remove all applied patches.\n   -f\n  Force remove. The state before the patch(es) were applied will be restored\n   -R\n  Always verify if the patch removes cleanly; don't rely on timestamp\n   -q\n  Quiet operation.\n   -v\n  Verbose operation.\n   --refresh\n    Automatically refresh every patch before it gets\n"
          }
        ],
        "field": [
          {
            "id": "target",
            "label": "Count or patch name",
            "type": "string",
            "position": 0,
            "sources": [
              "man"
            ]
          },
          {
            "id": "all",
            "label": "Remove all patches",
            "type": "boolean",
            "option": [
              "-a"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "force",
            "label": "Force remove",
            "type": "boolean",
            "option": [
              "-f"
            ],
            "effect": "overwrite",
            "sources": [
              "man"
            ]
          },
          {
            "id": "verify",
            "label": "Always verify clean removal",
            "type": "boolean",
            "option": [
              "-R"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "quiet",
            "label": "Quiet",
            "type": "boolean",
            "option": [
              "-q"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "verbose",
            "label": "Verbose",
            "type": "boolean",
            "option": [
              "-v"
            ],
            "sources": [
              "man"
            ]
          },
          {
            "id": "refresh",
            "label": "Refresh before unapplying",
            "type": "boolean",
            "option": [
              "--refresh"
            ],
            "sources": [
              "man"
            ]
          }
        ],
        "task": [
          {
            "id": "top",
            "label": "Remove topmost patch",
            "fields": [
              "target",
              "verbose"
            ],
            "required": []
          },
          {
            "id": "all",
            "label": "Remove all patches",
            "set": {
              "all": [
                true
              ]
            },
            "lock": [
              "all"
            ],
            "fields": [
              "all",
              "verbose",
              "quiet"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "target",
              "all",
              "verbose",
              "quiet"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "force",
              "verify",
              "refresh"
            ]
          }
        ]
      }
    ]
  }
}
