@statewalker/vcs-commands 0.8.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/add-command.d.ts +32 -0
- package/dist/commands/add-command.d.ts.map +1 -1
- package/dist/commands/add-patch/add-patch.d.ts +7 -0
- package/dist/commands/add-patch/add-patch.d.ts.map +1 -1
- package/dist/commands/add-patch/patch-backend.d.ts.map +1 -1
- package/dist/commands/am/am-command.d.ts +47 -0
- package/dist/commands/am/am-command.d.ts.map +1 -1
- package/dist/commands/apply/apply-command.d.ts +2 -0
- package/dist/commands/apply/apply-command.d.ts.map +1 -1
- package/dist/commands/apply/apply-parse.d.ts +7 -0
- package/dist/commands/apply/apply-parse.d.ts.map +1 -1
- package/dist/commands/apply/index.d.ts +1 -1
- package/dist/commands/apply/index.d.ts.map +1 -1
- package/dist/commands/blame-command.d.ts +303 -8
- package/dist/commands/blame-command.d.ts.map +1 -1
- package/dist/commands/blame-ignore.d.ts +48 -0
- package/dist/commands/blame-ignore.d.ts.map +1 -0
- package/dist/commands/check-mailmap-command.d.ts +49 -0
- package/dist/commands/check-mailmap-command.d.ts.map +1 -0
- package/dist/commands/checkout-command.d.ts +7 -0
- package/dist/commands/checkout-command.d.ts.map +1 -1
- package/dist/commands/checkout-paths.d.ts +4 -0
- package/dist/commands/checkout-paths.d.ts.map +1 -1
- package/dist/commands/cherry-command.d.ts +61 -0
- package/dist/commands/cherry-command.d.ts.map +1 -0
- package/dist/commands/cherry-pick-command.d.ts +23 -1
- package/dist/commands/cherry-pick-command.d.ts.map +1 -1
- package/dist/commands/clean-command.d.ts +32 -0
- package/dist/commands/clean-command.d.ts.map +1 -1
- package/dist/commands/clean-interactive.d.ts +56 -0
- package/dist/commands/clean-interactive.d.ts.map +1 -0
- package/dist/commands/clone-command.d.ts +116 -2
- package/dist/commands/clone-command.d.ts.map +1 -1
- package/dist/commands/commit-command.d.ts +50 -2
- package/dist/commands/commit-command.d.ts.map +1 -1
- package/dist/commands/describe-command.d.ts +71 -64
- package/dist/commands/describe-command.d.ts.map +1 -1
- package/dist/commands/diff-command.d.ts +118 -6
- package/dist/commands/diff-command.d.ts.map +1 -1
- package/dist/commands/fetch-command.d.ts +60 -0
- package/dist/commands/fetch-command.d.ts.map +1 -1
- package/dist/commands/fetch-multiple-command.d.ts +193 -0
- package/dist/commands/fetch-multiple-command.d.ts.map +1 -0
- package/dist/commands/format-patch-command.d.ts +28 -2
- package/dist/commands/format-patch-command.d.ts.map +1 -1
- package/dist/commands/git-describe.d.ts +77 -4
- package/dist/commands/git-describe.d.ts.map +1 -1
- package/dist/commands/git-hooks.d.ts +15 -1
- package/dist/commands/git-hooks.d.ts.map +1 -1
- package/dist/commands/index.d.ts +12 -0
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +5 -3
- package/dist/commands/init-command.d.ts +89 -0
- package/dist/commands/init-command.d.ts.map +1 -1
- package/dist/commands/line-log.d.ts +161 -0
- package/dist/commands/line-log.d.ts.map +1 -0
- package/dist/commands/log-command.d.ts +235 -6
- package/dist/commands/log-command.d.ts.map +1 -1
- package/dist/commands/log-graph.d.ts +4 -2
- package/dist/commands/log-graph.d.ts.map +1 -1
- package/dist/commands/log-output.d.ts +66 -1
- package/dist/commands/log-output.d.ts.map +1 -1
- package/dist/commands/mailmap.d.ts +24 -1
- package/dist/commands/mailmap.d.ts.map +1 -1
- package/dist/commands/merge-command.d.ts +51 -1
- package/dist/commands/merge-command.d.ts.map +1 -1
- package/dist/commands/merge-drivers.d.ts +2 -0
- package/dist/commands/merge-drivers.d.ts.map +1 -1
- package/dist/commands/merge-strategy-options.d.ts +69 -0
- package/dist/commands/merge-strategy-options.d.ts.map +1 -0
- package/dist/commands/merge-support.d.ts +10 -0
- package/dist/commands/merge-support.d.ts.map +1 -1
- package/dist/commands/message-cleanup.d.ts +2 -0
- package/dist/commands/message-cleanup.d.ts.map +1 -1
- package/dist/commands/name-rev-command.d.ts +65 -0
- package/dist/commands/name-rev-command.d.ts.map +1 -0
- package/dist/commands/name-rev.d.ts +110 -22
- package/dist/commands/name-rev.d.ts.map +1 -1
- package/dist/commands/octopus-merge.d.ts +26 -1
- package/dist/commands/octopus-merge.d.ts.map +1 -1
- package/dist/commands/ort-merge.d.ts +16 -0
- package/dist/commands/ort-merge.d.ts.map +1 -1
- package/dist/commands/ort-recursive.d.ts.map +1 -1
- package/dist/commands/patch-id.d.ts +58 -0
- package/dist/commands/patch-id.d.ts.map +1 -1
- package/dist/commands/pull-command.d.ts +182 -38
- package/dist/commands/pull-command.d.ts.map +1 -1
- package/dist/commands/push-command.d.ts +65 -0
- package/dist/commands/push-command.d.ts.map +1 -1
- package/dist/commands/range-diff/index.d.ts +4 -0
- package/dist/commands/range-diff/index.d.ts.map +1 -0
- package/dist/commands/range-diff/linear-assignment.d.ts +27 -0
- package/dist/commands/range-diff/linear-assignment.d.ts.map +1 -0
- package/dist/commands/range-diff/range-diff-command.d.ts +121 -0
- package/dist/commands/range-diff/range-diff-command.d.ts.map +1 -0
- package/dist/commands/range-diff/range-diff.d.ts +106 -0
- package/dist/commands/range-diff/range-diff.d.ts.map +1 -0
- package/dist/commands/read-tree-command.d.ts +14 -0
- package/dist/commands/read-tree-command.d.ts.map +1 -1
- package/dist/commands/rebase-command.d.ts +21 -2
- package/dist/commands/rebase-command.d.ts.map +1 -1
- package/dist/commands/remerge-diff.d.ts +59 -0
- package/dist/commands/remerge-diff.d.ts.map +1 -0
- package/dist/commands/remote-command.d.ts +41 -0
- package/dist/commands/remote-command.d.ts.map +1 -1
- package/dist/commands/remote-show-command.d.ts +204 -0
- package/dist/commands/remote-show-command.d.ts.map +1 -0
- package/dist/commands/reset-command.d.ts +19 -1
- package/dist/commands/reset-command.d.ts.map +1 -1
- package/dist/commands/restore-command.d.ts +7 -0
- package/dist/commands/restore-command.d.ts.map +1 -1
- package/dist/commands/rev-list-command.d.ts +75 -3
- package/dist/commands/rev-list-command.d.ts.map +1 -1
- package/dist/commands/revert-command.d.ts +22 -1
- package/dist/commands/revert-command.d.ts.map +1 -1
- package/dist/commands/revision-range.d.ts +2 -0
- package/dist/commands/revision-range.d.ts.map +1 -1
- package/dist/commands/sequencer-pick.d.ts +102 -1
- package/dist/commands/sequencer-pick.d.ts.map +1 -1
- package/dist/commands/sequencer-support.d.ts +10 -1
- package/dist/commands/sequencer-support.d.ts.map +1 -1
- package/dist/commands/shortlog-command.d.ts +109 -0
- package/dist/commands/shortlog-command.d.ts.map +1 -0
- package/dist/commands/shortlog.d.ts +151 -0
- package/dist/commands/shortlog.d.ts.map +1 -0
- package/dist/commands/status-command.d.ts +31 -2
- package/dist/commands/status-command.d.ts.map +1 -1
- package/dist/commands/submodule-commands.d.ts +90 -2
- package/dist/commands/submodule-commands.d.ts.map +1 -1
- package/dist/commands/submodule-fetch.d.ts +149 -0
- package/dist/commands/submodule-fetch.d.ts.map +1 -0
- package/dist/commands/submodule-model.d.ts +8 -0
- package/dist/commands/submodule-model.d.ts.map +1 -1
- package/dist/commands/submodule-unpack.d.ts +120 -0
- package/dist/commands/submodule-unpack.d.ts.map +1 -0
- package/dist/commands/submodule-update-command.d.ts +8 -0
- package/dist/commands/submodule-update-command.d.ts.map +1 -1
- package/dist/commands/subtree-shift.d.ts +27 -0
- package/dist/commands/subtree-shift.d.ts.map +1 -0
- package/dist/commands/switch-command.d.ts +3 -0
- package/dist/commands/switch-command.d.ts.map +1 -1
- package/dist/commands/tree-restore.d.ts.map +1 -1
- package/dist/commands/worktree-overwrite-checks.d.ts +2 -0
- package/dist/commands/worktree-overwrite-checks.d.ts.map +1 -1
- package/dist/{commands-ISM52N0n.js → commands-CNvli5bl.js} +39426 -61169
- package/dist/errors/command-errors.d.ts +25 -0
- package/dist/errors/command-errors.d.ts.map +1 -1
- package/dist/errors/index.js +29 -1
- package/dist/fsck-CPeDh9fh.js +5138 -0
- package/dist/git-command.d.ts +31 -1
- package/dist/git-command.d.ts.map +1 -1
- package/dist/git.d.ts +97 -1
- package/dist/git.d.ts.map +1 -1
- package/dist/guarded-transport-command.d.ts +82 -0
- package/dist/guarded-transport-command.d.ts.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -5
- package/dist/remote-transport-CCmBadm-.js +1606 -0
- package/dist/rename/detect-renames.d.ts +20 -0
- package/dist/rename/detect-renames.d.ts.map +1 -1
- package/dist/rename/diffcore-break.d.ts +51 -0
- package/dist/rename/diffcore-break.d.ts.map +1 -0
- package/dist/rename/index.d.ts +1 -0
- package/dist/rename/index.d.ts.map +1 -1
- package/dist/results/blame-format.d.ts +62 -1
- package/dist/results/blame-format.d.ts.map +1 -1
- package/dist/results/clone-result.d.ts +9 -0
- package/dist/results/clone-result.d.ts.map +1 -1
- package/dist/results/diff-dirstat.d.ts +36 -0
- package/dist/results/diff-dirstat.d.ts.map +1 -0
- package/dist/results/diff-entry.d.ts +10 -0
- package/dist/results/diff-entry.d.ts.map +1 -1
- package/dist/results/diff-formatter.d.ts.map +1 -1
- package/dist/results/diff-output.d.ts +18 -0
- package/dist/results/diff-output.d.ts.map +1 -1
- package/dist/results/fetch-result.d.ts +12 -1
- package/dist/results/fetch-result.d.ts.map +1 -1
- package/dist/results/index.d.ts +2 -0
- package/dist/results/index.d.ts.map +1 -1
- package/dist/results/index.js +2 -2
- package/dist/results/init-result.d.ts +8 -1
- package/dist/results/init-result.d.ts.map +1 -1
- package/dist/results/line-range-hunks.d.ts +27 -0
- package/dist/results/line-range-hunks.d.ts.map +1 -0
- package/dist/results/merge-result.d.ts +8 -1
- package/dist/results/merge-result.d.ts.map +1 -1
- package/dist/results/pull-result.d.ts +11 -0
- package/dist/results/pull-result.d.ts.map +1 -1
- package/dist/results/push-result.d.ts +5 -0
- package/dist/results/push-result.d.ts.map +1 -1
- package/dist/results/status-result.d.ts +1 -1
- package/dist/results/status-result.d.ts.map +1 -1
- package/dist/results-BDuEgdLU.js +46847 -0
- package/dist/transport-command.d.ts +14 -0
- package/dist/transport-command.d.ts.map +1 -1
- package/package.json +12 -12
- package/src/commands/add-command.ts +115 -0
- package/src/commands/add-patch/add-patch.ts +8 -0
- package/src/commands/add-patch/patch-backend.ts +20 -2
- package/src/commands/am/am-command.ts +138 -4
- package/src/commands/apply/apply-command.ts +52 -9
- package/src/commands/apply/apply-parse.ts +10 -0
- package/src/commands/apply/index.ts +8 -1
- package/src/commands/blame-command.ts +1450 -51
- package/src/commands/blame-ignore.ts +307 -0
- package/src/commands/check-mailmap-command.ts +129 -0
- package/src/commands/checkout-command.ts +97 -12
- package/src/commands/checkout-paths.ts +28 -0
- package/src/commands/cherry-command.ts +187 -0
- package/src/commands/cherry-pick-command.ts +42 -1
- package/src/commands/clean-command.ts +92 -12
- package/src/commands/clean-interactive.ts +522 -0
- package/src/commands/clone-command.ts +596 -44
- package/src/commands/commit-command.ts +180 -47
- package/src/commands/describe-command.ts +341 -254
- package/src/commands/diff-command.ts +616 -56
- package/src/commands/fetch-command.ts +353 -6
- package/src/commands/fetch-multiple-command.ts +665 -0
- package/src/commands/format-patch-command.ts +189 -77
- package/src/commands/git-describe.ts +456 -217
- package/src/commands/git-hooks.ts +42 -3
- package/src/commands/index.ts +17 -0
- package/src/commands/init-command.ts +603 -49
- package/src/commands/line-log.ts +931 -0
- package/src/commands/log-command.ts +1414 -177
- package/src/commands/log-graph.ts +6 -3
- package/src/commands/log-output.ts +173 -10
- package/src/commands/mailmap.ts +41 -5
- package/src/commands/merge-command.ts +274 -16
- package/src/commands/merge-drivers.ts +3 -0
- package/src/commands/merge-strategy-options.ts +224 -0
- package/src/commands/merge-support.ts +101 -21
- package/src/commands/message-cleanup.ts +1 -1
- package/src/commands/name-rev-command.ts +184 -0
- package/src/commands/name-rev.ts +700 -109
- package/src/commands/octopus-merge.ts +35 -11
- package/src/commands/ort-merge.ts +41 -7
- package/src/commands/ort-recursive.ts +40 -2
- package/src/commands/patch-id.ts +109 -0
- package/src/commands/pull-command.ts +718 -224
- package/src/commands/push-command.ts +353 -3
- package/src/commands/range-diff/index.ts +3 -0
- package/src/commands/range-diff/linear-assignment.ts +203 -0
- package/src/commands/range-diff/range-diff-command.ts +433 -0
- package/src/commands/range-diff/range-diff.ts +617 -0
- package/src/commands/read-tree-command.ts +74 -3
- package/src/commands/rebase-command.ts +141 -65
- package/src/commands/remerge-diff.ts +241 -0
- package/src/commands/remote-command.ts +98 -10
- package/src/commands/remote-show-command.ts +836 -0
- package/src/commands/reset-command.ts +78 -3
- package/src/commands/restore-command.ts +15 -0
- package/src/commands/rev-list-command.ts +187 -11
- package/src/commands/revert-command.ts +41 -1
- package/src/commands/revision-range.ts +3 -1
- package/src/commands/sequencer-pick.ts +323 -29
- package/src/commands/sequencer-support.ts +164 -2
- package/src/commands/shortlog-command.ts +354 -0
- package/src/commands/shortlog.ts +361 -0
- package/src/commands/show-command.ts +2 -1
- package/src/commands/status-command.ts +115 -25
- package/src/commands/status-format.ts +1 -1
- package/src/commands/submodule-commands.ts +321 -3
- package/src/commands/submodule-fetch.ts +789 -0
- package/src/commands/submodule-model.ts +9 -1
- package/src/commands/submodule-unpack.ts +265 -0
- package/src/commands/submodule-update-command.ts +39 -5
- package/src/commands/subtree-shift.ts +215 -0
- package/src/commands/switch-command.ts +9 -0
- package/src/commands/tree-restore.ts +6 -1
- package/src/commands/worktree-overwrite-checks.ts +5 -0
- package/src/errors/command-errors.ts +35 -0
- package/src/git-command.ts +87 -1
- package/src/git.ts +146 -0
- package/src/guarded-transport-command.ts +171 -0
- package/src/index.ts +1 -0
- package/src/rename/detect-renames.ts +42 -8
- package/src/rename/diffcore-break.ts +166 -0
- package/src/rename/index.ts +1 -0
- package/src/results/blame-format.ts +268 -43
- package/src/results/clone-result.ts +6 -0
- package/src/results/diff-dirstat.ts +117 -0
- package/src/results/diff-entry.ts +12 -0
- package/src/results/diff-formatter.ts +1 -0
- package/src/results/diff-output.ts +127 -2
- package/src/results/fetch-result.ts +12 -1
- package/src/results/index.ts +2 -0
- package/src/results/init-result.ts +10 -1
- package/src/results/line-range-hunks.ts +126 -0
- package/src/results/merge-result.ts +9 -0
- package/src/results/pull-result.ts +7 -0
- package/src/results/push-result.ts +5 -0
- package/src/results/status-result.ts +2 -2
- package/src/transport-command.ts +34 -3
- package/dist/fsck-DLRpbwTj.js +0 -13405
- package/dist/results-TB2IJ64h.js +0 -4700
|
@@ -9,7 +9,9 @@ import { type ObjectId, type PersonIdent } from "@statewalker/vcs-core";
|
|
|
9
9
|
import type { Worktree } from "@statewalker/vcs-working-tree";
|
|
10
10
|
import type { CommandCommits, CommandRefs, CommandTrees } from "../git-command.js";
|
|
11
11
|
import { type HookSession } from "./git-hooks.js";
|
|
12
|
-
import { type MergeWriteContext, type OperationState } from "./merge-support.js";
|
|
12
|
+
import { FlatTreeCache, type MergeWriteContext, type OperationState } from "./merge-support.js";
|
|
13
|
+
import { type OrtConflict } from "./ort-merge.js";
|
|
14
|
+
import type { CheckedEntry } from "./worktree-overwrite-checks.js";
|
|
13
15
|
/** What the sequencer does with each commit. */
|
|
14
16
|
export type PickAction = "pick" | "revert";
|
|
15
17
|
/** What a cherry-pick or revert is asked to do. */
|
|
@@ -73,6 +75,16 @@ export interface PickOptions {
|
|
|
73
75
|
noCommit?: boolean;
|
|
74
76
|
mainline?: number;
|
|
75
77
|
favor?: "ours" | "theirs" | "union";
|
|
78
|
+
/**
|
|
79
|
+
* `-s <strategy>` (git's opts->strategy): `ort`/`recursive` (merge-ort, as without one),
|
|
80
|
+
* `resolve` (git-merge-resolve) or `subtree` (git merge-subtree); a revert always runs
|
|
81
|
+
* merge-ort. Saved in `sequencer/opts` (`options.strategy`).
|
|
82
|
+
*/
|
|
83
|
+
strategy?: string;
|
|
84
|
+
/** `-X <option>`s (saved in `sequencer/opts` as `options.strategy-option`) */
|
|
85
|
+
strategyOptions?: string[];
|
|
86
|
+
/** The git version to follow where they differ (default: the hook runner's) */
|
|
87
|
+
compatibility?: "2.43" | "2.56";
|
|
76
88
|
/** The label of HEAD in conflict markers (default `HEAD`) */
|
|
77
89
|
oursLabel?: string;
|
|
78
90
|
/**
|
|
@@ -146,7 +158,13 @@ export declare class PickSequencer {
|
|
|
146
158
|
private readonly flags;
|
|
147
159
|
/** commit.cleanup (git's default_msg_cleanup with explicit_cleanup), or saved in the opts */
|
|
148
160
|
private cleanup;
|
|
161
|
+
/** `-s` (git's opts->strategy), or saved in the opts */
|
|
162
|
+
private strategy;
|
|
163
|
+
/** `-X` options (git's opts->xopts), or saved in the opts */
|
|
164
|
+
private xopts;
|
|
149
165
|
constructor(deps: SequencerDeps, options: PickOptions);
|
|
166
|
+
/** The git version to follow where they differ */
|
|
167
|
+
private get compatibility();
|
|
150
168
|
private config;
|
|
151
169
|
private get name();
|
|
152
170
|
private fail;
|
|
@@ -159,6 +177,8 @@ export declare class PickSequencer {
|
|
|
159
177
|
private resolvePick;
|
|
160
178
|
/** Picks `todo` in order; `sequenced`: a `sequencer/` directory tracks the progress. */
|
|
161
179
|
private run;
|
|
180
|
+
/** The merge of a pick: {@link mergePickChange} with this run's strategy and options. */
|
|
181
|
+
private mergePick;
|
|
162
182
|
/** One commit's change merged into HEAD (do_pick_commit). */
|
|
163
183
|
private pickOne;
|
|
164
184
|
/**
|
|
@@ -268,4 +288,85 @@ export declare function expandCommitIds(deps: {
|
|
|
268
288
|
refs: CommandRefs;
|
|
269
289
|
state: OperationState;
|
|
270
290
|
}, ids: string[]): Promise<ObjectId[]>;
|
|
291
|
+
/** What {@link mergePickChange} reads and writes with. */
|
|
292
|
+
export interface PickMergeContext {
|
|
293
|
+
workingCopy: SequencerDeps["workingCopy"];
|
|
294
|
+
worktree?: Worktree;
|
|
295
|
+
staging: SequencerDeps["staging"];
|
|
296
|
+
blobs: SequencerDeps["blobs"];
|
|
297
|
+
trees: CommandTrees;
|
|
298
|
+
commits: CommandCommits;
|
|
299
|
+
flats: FlatTreeCache;
|
|
300
|
+
abbreviate: (id: ObjectId) => Promise<string>;
|
|
301
|
+
}
|
|
302
|
+
/** The pick {@link mergePickChange} merges. */
|
|
303
|
+
export interface PickMergeArgs {
|
|
304
|
+
action: PickAction;
|
|
305
|
+
headId: ObjectId | undefined;
|
|
306
|
+
/** HEAD's tree (undefined: the empty tree of an unborn branch) */
|
|
307
|
+
headTreeId: ObjectId | undefined;
|
|
308
|
+
base: ObjectId | undefined;
|
|
309
|
+
theirs: ObjectId | undefined;
|
|
310
|
+
baseLabel: string;
|
|
311
|
+
theirsLabel: string;
|
|
312
|
+
pickId: ObjectId;
|
|
313
|
+
parentId: ObjectId | undefined;
|
|
314
|
+
/** `-s` (undefined: merge-ort) */
|
|
315
|
+
strategy: string | undefined;
|
|
316
|
+
/** `-X` options */
|
|
317
|
+
xopts: readonly string[];
|
|
318
|
+
/** HEAD's label in merge-ort's markers */
|
|
319
|
+
oursLabel: string;
|
|
320
|
+
/** `-X ours` / `-X theirs` / union given apart from the options */
|
|
321
|
+
favor?: "ours" | "theirs" | "union";
|
|
322
|
+
/** The git version whose behaviour to follow where they differ (default 2.56) */
|
|
323
|
+
compatibility?: "2.43" | "2.56";
|
|
324
|
+
}
|
|
325
|
+
/** What {@link mergePickChange} found: the result to switch to, or git's failure. */
|
|
326
|
+
export type PickMergeResult = {
|
|
327
|
+
treeId: ObjectId;
|
|
328
|
+
conflicts: OrtConflict[];
|
|
329
|
+
/** The paths the conflicts are about (merge-ort's keys; a file moved aside's own path) */
|
|
330
|
+
conflictPaths: string[];
|
|
331
|
+
clean: boolean;
|
|
332
|
+
/** What the strategy printed (merge-ort's messages, git-merge-resolve's stdout) */
|
|
333
|
+
messages: string[];
|
|
334
|
+
/** Whether to record AUTO_MERGE (merge-ort's result tree) */
|
|
335
|
+
autoMerge: boolean;
|
|
336
|
+
/** Whether the strategy ran as git's child command (resolve, subtree) */
|
|
337
|
+
external: boolean;
|
|
338
|
+
/** What git-merge-one-file printed on stderr */
|
|
339
|
+
errors?: string[];
|
|
340
|
+
/** The switch to make, when it is not HEAD's tree to `treeId` */
|
|
341
|
+
delta?: {
|
|
342
|
+
from: Map<string, CheckedEntry>;
|
|
343
|
+
to: Map<string, CheckedEntry>;
|
|
344
|
+
};
|
|
345
|
+
/** What was printed before a refused switch */
|
|
346
|
+
refusedOutput?: string[];
|
|
347
|
+
} | {
|
|
348
|
+
failed: string;
|
|
349
|
+
/** The strategy gave up (exit 2): the pick fails as do_pick_commit's res -1 */
|
|
350
|
+
strategyFailed?: boolean;
|
|
351
|
+
output?: string[];
|
|
352
|
+
};
|
|
353
|
+
/**
|
|
354
|
+
* The merge of a pick (do_pick_commit): merge-ort (do_recursive_merge, with the `-X`
|
|
355
|
+
* options) unless `-s` names another strategy; `subtree` is git merge-subtree (merge-ort
|
|
356
|
+
* with the shift, the commits' full ids as labels), `resolve` git-merge-resolve
|
|
357
|
+
* (`read-tree -m --aggressive` and git-merge-one-file). Nothing is written but blobs and
|
|
358
|
+
* trees: the caller switches to the result.
|
|
359
|
+
*/
|
|
360
|
+
export declare function mergePickChange(ctx: PickMergeContext, p: PickMergeArgs): Promise<PickMergeResult>;
|
|
361
|
+
/**
|
|
362
|
+
* config.c's write_pair: a value as `git config` writes it (quoted when it starts or ends
|
|
363
|
+
* with a space or holds `;`, `#` or CR; `\n`, `\t`, `"` and `\` escaped).
|
|
364
|
+
*/
|
|
365
|
+
export declare function configValueText(value: string): string;
|
|
366
|
+
/**
|
|
367
|
+
* config.c's parse_value of the text after a variable's `=` on one line: blanks around it
|
|
368
|
+
* dropped, `"..."` keeping them, escapes undone, an unquoted `;` or `#` starting a comment;
|
|
369
|
+
* undefined where git refuses the line.
|
|
370
|
+
*/
|
|
371
|
+
export declare function parseConfigValueText(text: string): string | undefined;
|
|
271
372
|
//# sourceMappingURL=sequencer-pick.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sequencer-pick.d.ts","sourceRoot":"","sources":["../../src/commands/sequencer-pick.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAEL,KAAK,QAAQ,EAEb,KAAK,WAAW,EAC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C,EAAE,OAAO,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAEN;;;;;;GAMG;AACH,wBAAsB,eAAe,CACnC,GAAG,EAAE,gBAAgB,EACrB,CAAC,EAAE,aAAa,GACf,OAAO,CAAC,eAAe,CAAC,CAkG1B;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAMrD;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CA8BrE"}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import { type ObjectId, type PersonIdent, type RefLogOptions } from "@statewalker/vcs-core";
|
|
7
7
|
import type { CommandCommits, CommandRefs } from "../git-command.js";
|
|
8
8
|
import { type MergeRefusal, type MergeWriteContext, type OperationState } from "./merge-support.js";
|
|
9
|
+
import type { SubmoduleUnpack } from "./submodule-unpack.js";
|
|
9
10
|
/** What resetting the index and worktree needs. */
|
|
10
11
|
export interface SequencerContext extends MergeWriteContext {
|
|
11
12
|
commits: CommandCommits;
|
|
@@ -41,6 +42,12 @@ export interface OnewayMergeOptions {
|
|
|
41
42
|
targetTree?: ObjectId;
|
|
42
43
|
/** `read-tree`'s refusal: the `error:` line alone, without `fatal: Could not reset ...` */
|
|
43
44
|
plain?: boolean;
|
|
45
|
+
/** `--recurse-submodules`: the active submodules checked and moved with the worktree */
|
|
46
|
+
submodules?: SubmoduleUnpack;
|
|
47
|
+
/** False (`read-tree -n`): the index is not written */
|
|
48
|
+
writeIndex?: boolean;
|
|
49
|
+
/** `read-tree -n` with `-u`: every check made, then nothing written (worktree or index) */
|
|
50
|
+
checkOnly?: boolean;
|
|
44
51
|
}
|
|
45
52
|
/**
|
|
46
53
|
* The first step of `am --abort`'s `clean_index`: `read_index_unmerged`, then unpack-trees'
|
|
@@ -61,7 +68,9 @@ export declare function resetUnmergedToHead(ctx: SequencerContext, headId: Objec
|
|
|
61
68
|
* changes (`verify_uptodate`), an untracked file in the way (`verify_absent`). HEAD is not
|
|
62
69
|
* moved. The caller refuses an index with unmerged entries first.
|
|
63
70
|
*/
|
|
64
|
-
export declare function resetKeep(ctx: SequencerContext, headId: ObjectId, targetId: ObjectId, label: string
|
|
71
|
+
export declare function resetKeep(ctx: SequencerContext, headId: ObjectId, targetId: ObjectId, label: string,
|
|
72
|
+
/** `--recurse-submodules`: the active submodules checked and moved with the worktree */
|
|
73
|
+
submodules?: SubmoduleUnpack): Promise<MergeRefusal | undefined>;
|
|
65
74
|
/**
|
|
66
75
|
* git's reset `update_refs`: ORIG_HEAD set to the HEAD left (`headId`), given the ORIG_HEAD
|
|
67
76
|
* it read as the old value (none when absent), then HEAD moved to `target` expecting the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sequencer-support.d.ts","sourceRoot":"","sources":["../../src/commands/sequencer-support.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAGL,KAAK,QAAQ,EAEb,KAAK,WAAW,EAChB,KAAK,aAAa,EACnB,MAAM,uBAAuB,CAAC;AAS/B,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrE,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EAGpB,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"sequencer-support.d.ts","sourceRoot":"","sources":["../../src/commands/sequencer-support.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAGL,KAAK,QAAQ,EAEb,KAAK,WAAW,EAChB,KAAK,aAAa,EACnB,MAAM,uBAAuB,CAAC;AAS/B,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrE,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EAGpB,MAAM,oBAAoB,CAAC;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,QAAQ,GACX,OAAO,CAAC,IAAI,CAAC,CAOf;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,SAAM,GAAG,MAAM,CAEzE;AAKD,yFAAyF;AACzF,wBAAgB,aAAa,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAOxD;AAED;;;;GAIG;AACH,wBAAsB,aAAa,CACjC,OAAO,EAAE,cAAc,EACvB,MAAM,EAAE,QAAQ,EAChB,KAAK,EAAE,QAAQ,GAAG,QAAQ,EAAE,EAC5B,UAAU,EAAE,CAAC,EAAE,EAAE,QAAQ,KAAK,OAAO,CAAC,MAAM,CAAC,GAC5C,OAAO,CAAC,MAAM,CAAC,CA2CjB"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `git shortlog` (builtin/shortlog.c) as a library command: the commits of a revision range
|
|
3
|
+
* (or of `git log` output, as git reads it on its stdin) grouped by author, committer,
|
|
4
|
+
* trailer values or formatted fields.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```typescript
|
|
8
|
+
* // git shortlog -ns HEAD
|
|
9
|
+
* await git.shortlog().addRevision("HEAD").setNumbered(true).setSummary(true).callText();
|
|
10
|
+
* // " 5\tA U Thor\n 1\tSomeone else\n"
|
|
11
|
+
*
|
|
12
|
+
* // git log | git shortlog -e
|
|
13
|
+
* await git.shortlog().setInput(logText).setEmail(true).callText();
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
import { GitCommand } from "../git-command.js";
|
|
17
|
+
import { RevListCommand } from "./rev-list-command.js";
|
|
18
|
+
import { type ShortlogEntry, type ShortlogWrap } from "./shortlog.js";
|
|
19
|
+
/**
|
|
20
|
+
* The shortlog of a repository's history or of `git log` output.
|
|
21
|
+
*
|
|
22
|
+
* Revisions ({@link addRevision}, {@link addArgument}, {@link addPath},
|
|
23
|
+
* {@link configureRevisions}) are walked as `git log` walks them; without any, the input given
|
|
24
|
+
* with {@link setInput} is read (`git log | git shortlog`), else HEAD's history (git's
|
|
25
|
+
* behaviour on a terminal). Each commit counts once per group it falls in (`--group` options,
|
|
26
|
+
* duplicates within one commit counted once), mapped through the repository's mailmap
|
|
27
|
+
* (`.mailmap`, `mailmap.blob`, `mailmap.file`).
|
|
28
|
+
*
|
|
29
|
+
* git's stderr (a `mailmap.blob` that is no blob) is in {@link getErrors}.
|
|
30
|
+
*/
|
|
31
|
+
export declare class ShortlogCommand extends GitCommand<ShortlogEntry[]> {
|
|
32
|
+
private summary;
|
|
33
|
+
private numbered;
|
|
34
|
+
private email;
|
|
35
|
+
private wrap?;
|
|
36
|
+
private groups;
|
|
37
|
+
private format?;
|
|
38
|
+
private date?;
|
|
39
|
+
private abbrev?;
|
|
40
|
+
private input?;
|
|
41
|
+
private revisionsNamed;
|
|
42
|
+
private readonly revisionSteps;
|
|
43
|
+
private readonly errors;
|
|
44
|
+
private shortlog?;
|
|
45
|
+
/** `-s` / `--summary`: only each group's count. */
|
|
46
|
+
setSummary(summary: boolean): this;
|
|
47
|
+
/** `-n` / `--numbered`: groups sorted by their count, largest first. */
|
|
48
|
+
setNumbered(numbered: boolean): this;
|
|
49
|
+
/** `-e` / `--email`: author and committer groups named `Name <email>`. */
|
|
50
|
+
setEmail(email: boolean): this;
|
|
51
|
+
/** `-c` / `--committer`: group by committer (as `--group=committer`). */
|
|
52
|
+
setCommitter(committer: boolean): this;
|
|
53
|
+
/**
|
|
54
|
+
* `--group=<type>`: `author`, `committer`, `trailer:<key>`, `format:<format>` (or a
|
|
55
|
+
* format with a `%`); repeatable. Throws git's `unknown group type` error (exit 129).
|
|
56
|
+
*/
|
|
57
|
+
addGroup(group: string): this;
|
|
58
|
+
/** `--no-group`: the groups given so far dropped (author again unless others follow). */
|
|
59
|
+
clearGroups(): this;
|
|
60
|
+
/**
|
|
61
|
+
* `-w[<width>[,<indent1>[,<indent2>]]]`: the argument as git reads it (undefined for a bare
|
|
62
|
+
* `-w`: 76, 6, 9), a {@link ShortlogWrap}, or false for `--no-w`... (no wrapping).
|
|
63
|
+
*/
|
|
64
|
+
setWrap(wrap?: string | ShortlogWrap | false): this;
|
|
65
|
+
/**
|
|
66
|
+
* `--format=<format>` / `--pretty=<format>`: each commit's line as this user format (`%h`,
|
|
67
|
+
* `format:%h`, `tformat:%h`) instead of its subject; a named format (`oneline`...) keeps
|
|
68
|
+
* the subject, as in git.
|
|
69
|
+
*/
|
|
70
|
+
setFormat(format: string): this;
|
|
71
|
+
/** `--date=<mode>`: the date mode of `%ad`/`%cd` in formats and groups. */
|
|
72
|
+
setDate(mode: string): this;
|
|
73
|
+
/** `--abbrev=<n>`: the length of `%h` and friends. */
|
|
74
|
+
setAbbrev(abbrev: number): this;
|
|
75
|
+
/** `git log` output to read when no revision is given (git's stdin). */
|
|
76
|
+
setInput(input: string): this;
|
|
77
|
+
/** A revision argument of the walk (see `RevListCommand.addRevision`: `a..b`, `--all`...). */
|
|
78
|
+
addRevision(revision: string): this;
|
|
79
|
+
/** An argument of `git shortlog <args>`, revisions and paths mixed (`RevListCommand.addArgument`). */
|
|
80
|
+
addArgument(arg: string): this;
|
|
81
|
+
/** Only commits that change `path`. */
|
|
82
|
+
addPath(path: string): this;
|
|
83
|
+
/** At most this many commits (`-n`). */
|
|
84
|
+
setMaxCount(maxCount: number): this;
|
|
85
|
+
/**
|
|
86
|
+
* Any other walk setting (`--author`, `--first-parent`, `--since`...): `configure` is run
|
|
87
|
+
* on each {@link RevListCommand} this command walks with; `names` says it names revisions
|
|
88
|
+
* (so the input is not read).
|
|
89
|
+
*/
|
|
90
|
+
configureRevisions(configure: (revisions: RevListCommand) => void, names?: boolean): this;
|
|
91
|
+
/** What git printed on stderr (`error:` lines of the mailmap's reading). */
|
|
92
|
+
getErrors(): string[];
|
|
93
|
+
/** The groups, in output order. */
|
|
94
|
+
call(): Promise<ShortlogEntry[]>;
|
|
95
|
+
/** git shortlog's output. */
|
|
96
|
+
callText(): Promise<string>;
|
|
97
|
+
/** git shortlog's output as bytes (the log output encoding's bytes kept as they were). */
|
|
98
|
+
callBytes(): Promise<Uint8Array>;
|
|
99
|
+
private run;
|
|
100
|
+
/** get_from_rev: every commit of the walk added (shortlog_add_commit). */
|
|
101
|
+
private walk;
|
|
102
|
+
/**
|
|
103
|
+
* Each commit of the walk formatted with each of `parts` (git's format_commit_message),
|
|
104
|
+
* in walk order: one walk for parts that cannot affect each other, another after a part
|
|
105
|
+
* whose state would reach the next.
|
|
106
|
+
*/
|
|
107
|
+
private formatParts;
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=shortlog-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shortlog-command.d.ts","sourceRoot":"","sources":["../../src/commands/shortlog-command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAG/C,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAML,KAAK,aAAa,EAElB,KAAK,YAAY,EAElB,MAAM,eAAe,CAAC;AAUvB;;;;;;;;;;;GAWG;AACH,qBAAa,eAAgB,SAAQ,UAAU,CAAC,aAAa,EAAE,CAAC;IAC9D,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,IAAI,CAAC,CAAe;IAC5B,OAAO,CAAC,MAAM,CAAuB;IACrC,OAAO,CAAC,MAAM,CAAC,CAAS;IACxB,OAAO,CAAC,IAAI,CAAC,CAAS;IACtB,OAAO,CAAC,MAAM,CAAC,CAAS;IACxB,OAAO,CAAC,KAAK,CAAC,CAAS;IACvB,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAuC;IACrE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgB;IACvC,OAAO,CAAC,QAAQ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ED,mCAAmC;IAC7B,IAAI,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC,CAErC;IAED,6BAA6B;IACvB,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC,CAEhC;IAED,0FAA0F;IACpF,SAAS,IAAI,OAAO,CAAC,UAAU,CAAC,CAErC;YAEa,GAAG;IAoBjB,0EAA0E;YAC5D,IAAI;IAkElB;;;;OAIG;YACW,WAAW;CAqC1B"}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* git's shortlog (builtin/shortlog.c): commits grouped by author (or committer, trailer
|
|
3
|
+
* values, formatted fields), each group's subjects oldest first, sorted by name or by count.
|
|
4
|
+
* {@link ShortlogCommand} walks a repository's history into it, `format-patch`'s cover letter
|
|
5
|
+
* uses it for its summary, and {@link readShortlogInput} reads `git log` output into it as
|
|
6
|
+
* `git log | git shortlog` does.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* const log = new Shortlog({ wrap: { width: 76, indent1: 6, indent2: 9 } });
|
|
11
|
+
* log.insert("A U Thor", "Second commit");
|
|
12
|
+
* log.insert("A U Thor", "First commit");
|
|
13
|
+
* log.text(); // "A U Thor (2):\n First commit\n Second commit\n\n"
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* @module
|
|
17
|
+
*/
|
|
18
|
+
import type { Mailmap } from "./mailmap.js";
|
|
19
|
+
/** `-w[<width>[,<indent1>[,<indent2>]]]`: how each subject is wrapped. */
|
|
20
|
+
export interface ShortlogWrap {
|
|
21
|
+
/** The width (0: indented, not wrapped) */
|
|
22
|
+
width: number;
|
|
23
|
+
/** The first line's indent */
|
|
24
|
+
indent1: number;
|
|
25
|
+
/** The other lines' indent */
|
|
26
|
+
indent2: number;
|
|
27
|
+
}
|
|
28
|
+
/** How a {@link Shortlog} prints. */
|
|
29
|
+
export interface ShortlogOptions {
|
|
30
|
+
/** `-s`: only each group's count */
|
|
31
|
+
summary?: boolean;
|
|
32
|
+
/** `-n`: groups sorted by count, largest first (else by name, in byte order) */
|
|
33
|
+
numbered?: boolean;
|
|
34
|
+
/** `-w`: subjects wrapped (else indented by six spaces) */
|
|
35
|
+
wrap?: ShortlogWrap;
|
|
36
|
+
}
|
|
37
|
+
/** One group of a shortlog: its name and its subjects (oldest first) or count. */
|
|
38
|
+
export interface ShortlogEntry {
|
|
39
|
+
/** The group's name (an author's name, with `-e` its email too; a trailer's value...) */
|
|
40
|
+
ident: string;
|
|
41
|
+
/** How many commits the group has */
|
|
42
|
+
count: number;
|
|
43
|
+
/** The subjects, oldest first (empty with `-s`) */
|
|
44
|
+
subjects: string[];
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* How a commit's records are written in the log output encoding (logmsg_reencode): in
|
|
48
|
+
* `output` when its text (`text`, as UTF-8) converts, else in the commit's own encoding
|
|
49
|
+
* (`stored`), else as stored (UTF-8, bytes that are no UTF-8 kept as they were). Only UTF-8
|
|
50
|
+
* and ISO-8859-1 are converted.
|
|
51
|
+
*/
|
|
52
|
+
export declare function outputEncoderFor(output: string, text: string, stored: string): (s: string) => Uint8Array;
|
|
53
|
+
/** git's `-w` without a value. */
|
|
54
|
+
export declare const SHORTLOG_DEFAULT_WRAP: ShortlogWrap;
|
|
55
|
+
/**
|
|
56
|
+
* pretty.c's format_subject: the lines of the first paragraph, each without its trailing
|
|
57
|
+
* blanks, joined by `separator`.
|
|
58
|
+
*/
|
|
59
|
+
export declare function formatSubject(text: string, separator?: string): string;
|
|
60
|
+
/**
|
|
61
|
+
* A commit message's `%s`: its first paragraph after any blank lines, the lines joined by
|
|
62
|
+
* spaces (pretty.c's subject).
|
|
63
|
+
*/
|
|
64
|
+
export declare function commitSubject(message: string): string;
|
|
65
|
+
/**
|
|
66
|
+
* The groups of a shortlog, as builtin/shortlog.c keeps them: a sorted list of names, each
|
|
67
|
+
* with its subjects (insert_one_record) or its count (`-s`). A tag passed with a record
|
|
68
|
+
* comes back with its output (format-patch encodes each line as its commit asks).
|
|
69
|
+
*/
|
|
70
|
+
export declare class Shortlog<T = undefined> {
|
|
71
|
+
private readonly options;
|
|
72
|
+
private readonly groups;
|
|
73
|
+
constructor(options?: ShortlogOptions);
|
|
74
|
+
/** insert_one_record: a commit's `oneline` (its subject, or the format's output) under `ident`. */
|
|
75
|
+
insert(ident: string, oneline: string, tag?: T): void;
|
|
76
|
+
/** The groups in output order (by name in byte order, or by count with `-n`). */
|
|
77
|
+
entries(): ShortlogEntry[];
|
|
78
|
+
private sorted;
|
|
79
|
+
/**
|
|
80
|
+
* shortlog_output: the text, in pieces, each with the tag of the record it shows (a
|
|
81
|
+
* group's header has its first record's tag; separators have none).
|
|
82
|
+
*/
|
|
83
|
+
pieces(): {
|
|
84
|
+
text: string;
|
|
85
|
+
tag?: T;
|
|
86
|
+
}[];
|
|
87
|
+
/** shortlog_output's text. */
|
|
88
|
+
text(): string;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* parse_wrap_args: `-w` (undefined: 76, 6, 9) or `-w<width>[,<indent1>[,<indent2>]]`, each
|
|
92
|
+
* omitted number its default; throws git's `error: -w[...]` (exit 129) for a bad one.
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* ```typescript
|
|
96
|
+
* parseShortlogWrap("60,2"); // { width: 60, indent1: 2, indent2: 9 }
|
|
97
|
+
* ```
|
|
98
|
+
*/
|
|
99
|
+
export declare function parseShortlogWrap(arg?: string): ShortlogWrap;
|
|
100
|
+
/** One `--group` of a shortlog. */
|
|
101
|
+
export type ShortlogGroup = {
|
|
102
|
+
kind: "author";
|
|
103
|
+
} | {
|
|
104
|
+
kind: "committer";
|
|
105
|
+
} | {
|
|
106
|
+
kind: "trailer";
|
|
107
|
+
key: string;
|
|
108
|
+
} | {
|
|
109
|
+
kind: "format";
|
|
110
|
+
format: string;
|
|
111
|
+
};
|
|
112
|
+
/**
|
|
113
|
+
* parse_group_option: `author`, `committer` (without case), `trailer:<key>`,
|
|
114
|
+
* `format:<format>`, or a format with a `%` in it; throws git's `error: unknown group
|
|
115
|
+
* type: <arg>` (exit 129) for anything else.
|
|
116
|
+
*/
|
|
117
|
+
export declare function parseShortlogGroup(arg: string): ShortlogGroup;
|
|
118
|
+
/**
|
|
119
|
+
* ident.c's split_ident_line, for the name and the email: the name before the first `<`
|
|
120
|
+
* (without trailing blanks), the email up to the first `>` after it; undefined without both.
|
|
121
|
+
*/
|
|
122
|
+
export declare function splitIdent(text: string): {
|
|
123
|
+
name: string;
|
|
124
|
+
email: string;
|
|
125
|
+
} | undefined;
|
|
126
|
+
/**
|
|
127
|
+
* shortlog.c's parse_ident: an identity (`Name <email> ...`) through the mailmap, as a
|
|
128
|
+
* group's name (`Name`, with `email` `Name <email>`); undefined when it does not parse.
|
|
129
|
+
*/
|
|
130
|
+
export declare function shortlogIdent(text: string, mailmap: Mailmap | undefined, email: boolean): string | undefined;
|
|
131
|
+
/** The lines of a text as strbuf_getline_lf reads them (the LF dropped, a CR kept). */
|
|
132
|
+
export declare function inputLines(text: string): string[];
|
|
133
|
+
/**
|
|
134
|
+
* read_from_stdin: the commits of `git log` output (any format with `Author:`/`author `
|
|
135
|
+
* or, for committers, `Commit:`/`committer ` lines: medium, full, raw...) added to `log`, each
|
|
136
|
+
* under its identity through `mailmap` (with `email`, `Name <email>`) and the first
|
|
137
|
+
* non-blank line after its headers. Only one group, author or committer, can be read: git's
|
|
138
|
+
* errors (exit 128) for the others.
|
|
139
|
+
*
|
|
140
|
+
* @example
|
|
141
|
+
* ```typescript
|
|
142
|
+
* const log = new Shortlog();
|
|
143
|
+
* readShortlogInput(logText, log, { group: "author" });
|
|
144
|
+
* ```
|
|
145
|
+
*/
|
|
146
|
+
export declare function readShortlogInput<T>(text: string, log: Shortlog<T>, options?: {
|
|
147
|
+
groups?: ShortlogGroup[];
|
|
148
|
+
mailmap?: Mailmap;
|
|
149
|
+
email?: boolean;
|
|
150
|
+
}): void;
|
|
151
|
+
//# sourceMappingURL=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AAuF;AACvF,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAKjD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EACjC,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,EAChB,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,aAAa,EAAE,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAO,GAC7E,IAAI,CAyBN"}
|
|
@@ -116,7 +116,10 @@ export declare class StatusCommand extends GitCommand<Status> {
|
|
|
116
116
|
private resolvedUntracked;
|
|
117
117
|
private renames?;
|
|
118
118
|
private renameLimit?;
|
|
119
|
+
/** `-M[=<n>]` / `--find-renames[=<n>]`: its score text ("" for none) */
|
|
120
|
+
private findRenames?;
|
|
119
121
|
private ignoreSubmodules?;
|
|
122
|
+
private plumbingSubmodules;
|
|
120
123
|
private gitmodules?;
|
|
121
124
|
/** The commit the index is compared with: undefined is HEAD, null none (initial) */
|
|
122
125
|
private reference?;
|
|
@@ -166,6 +169,12 @@ export declare class StatusCommand extends GitCommand<Status> {
|
|
|
166
169
|
* decides, else `diff.renames`, else on (git's default).
|
|
167
170
|
*/
|
|
168
171
|
setRenames(renames: boolean): this;
|
|
172
|
+
/**
|
|
173
|
+
* `-M[=<n>]` / `--find-renames[=<n>]`: renames detected (copies too if `status.renames`
|
|
174
|
+
* asks for them) at least this similar (git's syntax: `90%`, `9`, `.9`; none, or "", the
|
|
175
|
+
* default 50%). Trailing text throws git's `error: invalid argument to find-renames`.
|
|
176
|
+
*/
|
|
177
|
+
setFindRenames(score?: string): this;
|
|
169
178
|
/**
|
|
170
179
|
* The rename limit: inexact renames are looked for only while the unpaired deleted
|
|
171
180
|
* times added paths stay within its square. Unset, `status.renameLimit` decides, else
|
|
@@ -179,6 +188,14 @@ export declare class StatusCommand extends GitCommand<Status> {
|
|
|
179
188
|
* submodules, `none` reports everything.
|
|
180
189
|
*/
|
|
181
190
|
setIgnoreSubmodules(mode: SubmoduleIgnoreMode): this;
|
|
191
|
+
/**
|
|
192
|
+
* Submodules as a plumbing `git diff-index HEAD` sees them (git describe's `--dirty`):
|
|
193
|
+
* `diff.ignoreSubmodules` is not read (only `git_diff_ui_config` reads it), a submodule
|
|
194
|
+
* without `submodule.<name>.ignore` counts its changes but not its untracked files, and
|
|
195
|
+
* one with it follows it (`none`: untracked files too) whatever {@link setUntrackedFiles}
|
|
196
|
+
* says.
|
|
197
|
+
*/
|
|
198
|
+
setPlumbingSubmodules(plumbing: boolean): this;
|
|
182
199
|
/**
|
|
183
200
|
* The commit the index is compared with instead of HEAD (`s->reference`: `git commit
|
|
184
201
|
* --amend` compares with `HEAD^1`), null for none (every entry new, as before the first
|
|
@@ -232,6 +249,11 @@ export declare class StatusCommand extends GitCommand<Status> {
|
|
|
232
249
|
* ones, under their own headers); in a file (the commit template) after the cut line.
|
|
233
250
|
*/
|
|
234
251
|
private verboseText;
|
|
252
|
+
/**
|
|
253
|
+
* wt_longstatus_print_verbose: the verbose diffs detect renames as status does
|
|
254
|
+
* (`s->detect_rename`, `rename_score`, `rename_limit`)
|
|
255
|
+
*/
|
|
256
|
+
private verboseRenames;
|
|
235
257
|
call(): Promise<Status>;
|
|
236
258
|
/** cmd_status's parse_pathspec (PATHSPEC_PREFER_FULL): none for no elements. */
|
|
237
259
|
private parsePaths;
|
|
@@ -251,8 +273,15 @@ export declare class StatusCommand extends GitCommand<Status> {
|
|
|
251
273
|
* index then; an assume-unchanged one missing records the null id).
|
|
252
274
|
*/
|
|
253
275
|
private indexIgnoreOids;
|
|
254
|
-
/**
|
|
255
|
-
|
|
276
|
+
/**
|
|
277
|
+
* What renames are detected (builtin/commit.c): the setter, else `status.renames`, else
|
|
278
|
+
* `diff.renames`, else renames; `-M` turns them on, keeping copies.
|
|
279
|
+
*/
|
|
280
|
+
private renameMode;
|
|
281
|
+
/** The rename threshold of `-M<n>` (git's `rename_score`), undefined for the default */
|
|
282
|
+
private renameScore;
|
|
283
|
+
/** The rename limit: the setter, else `status.renameLimit`, else `diff.renameLimit` */
|
|
284
|
+
private statusRenameLimit;
|
|
256
285
|
/**
|
|
257
286
|
* Pairs renames as git status does: on the index side (`diff-index --cached`) a path
|
|
258
287
|
* removed from the index with one added to it; on the worktree side (`diff-files`) a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status-command.d.ts","sourceRoot":"","sources":["../../src/commands/status-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4C,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEhG,OAAO,EAqBL,KAAK,WAAW,EAChB,KAAK,QAAQ,EAGd,MAAM,+BAA+B,CAAC;AAOvC,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"status-command.d.ts","sourceRoot":"","sources":["../../src/commands/status-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4C,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEhG,OAAO,EAqBL,KAAK,WAAW,EAChB,KAAK,QAAQ,EAGd,MAAM,+BAA+B,CAAC;AAOvC,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAS/C,OAAO,EACL,KAAK,MAAM,EAMZ,MAAM,6BAA6B,CAAC;AAgBrC,OAAO,EACL,KAAK,YAAY,EAEjB,KAAK,UAAU,EAEhB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAKL,KAAK,mBAAmB,EAEzB,MAAM,uBAAuB,CAAC;AAO/B,YAAY,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAkCjE;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,IAAI,GAAG,QAAQ,GAAG,KAAK,CAAC;AAEzD;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,aAAa,GAAG,UAAU,C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