UNPKG

jack-cli

Version:

Chop through that Git log wicked fast!

84 lines 2.55 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var Placeholder; (function (Placeholder) { /** * Will be replaced by the commit message of the currently selected commit * * Example: "offers commit message variable for custom commands" */ Placeholder["COMMIT_MESSAGE"] = "[%COMMIT_MESSAGE%]"; /** * Will always be replaced by a revision range, even if there is no marked * commit. Commands such as 'git diff' require this to show the changes for * just a single commit. * * Single Commit Example: 4a22d67^..4a22d67 * With Marked Commit Example: 9103ae0^..4a22d67 */ Placeholder["SHA_RANGE"] = "[%SHA_RANGE%]"; /** * Will be replaced by either a single commit SHA or a revision range if there * is a marked commit. * * Single Commit Example: 4a22d67 * With Marked Commit Example: 9103ae0^..4a22d67 */ Placeholder["SHA_SINGLE_OR_RANGE"] = "[%SHA_SINGLE_OR_RANGE%]"; /** * Will be replaced by the currently selected commit SHA. * * Single Commit Example: 4a22d67 * With Marked Commit Example: 4a22d67 */ Placeholder["SHA_SINGLE"] = "[%SHA_SINGLE%]"; })(Placeholder = exports.Placeholder || (exports.Placeholder = {})); exports.COMMANDS = [ /** * Open a diff */ { command: "git -p diff " + Placeholder.SHA_RANGE + " --patch --stat-width=1000", description: 'View total diff', foreground: true, key: 'd', }, /** * List changed files */ { command: "git -p diff " + Placeholder.SHA_RANGE + " --name-only", description: 'View changed file names', foreground: true, key: 'l', }, /** * Open changes in a difftool */ { command: "git difftool " + Placeholder.SHA_RANGE, description: 'Open total diff in difftool', key: 't', }, /** * Attempt a cherry-pick */ { command: "git cherry-pick " + Placeholder.SHA_SINGLE_OR_RANGE, description: 'Cherry-pick commits', key: 'S-c', onErrorCommand: 'git cherry-pick --abort', }, /** * Begin an interactive rebase */ { command: "git rebase -i " + Placeholder.SHA_SINGLE + "^", description: 'Perform interactive rebase', foreground: true, key: 'S-i', onErrorCommand: 'git rebase --abort', refreshOnComplete: true, }, ]; //# sourceMappingURL=commands-def.js.map