@statewalker/vcs-commands 0.1.1 → 0.3.1

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.
Files changed (85) hide show
  1. package/dist/commands/commit-command.d.ts.map +1 -1
  2. package/dist/commands/init-command.d.ts.map +1 -1
  3. package/dist/commands/push-command.d.ts.map +1 -1
  4. package/dist/core-commands/checkout.command.impl.d.ts +1 -1
  5. package/dist/core-commands/checkout.command.impl.d.ts.map +1 -1
  6. package/dist/git-command.d.ts.map +1 -1
  7. package/package.json +19 -14
  8. package/src/commands/add-command.ts +494 -0
  9. package/src/commands/blame-command.ts +1241 -0
  10. package/src/commands/branch-command.ts +487 -0
  11. package/src/commands/checkout-command.ts +681 -0
  12. package/src/commands/cherry-pick-command.ts +544 -0
  13. package/src/commands/clean-command.ts +218 -0
  14. package/src/commands/clone-command.ts +532 -0
  15. package/src/commands/commit-command.ts +529 -0
  16. package/src/commands/describe-command.ts +454 -0
  17. package/src/commands/diff-command.ts +257 -0
  18. package/src/commands/fetch-command.ts +615 -0
  19. package/src/commands/gc-command.ts +155 -0
  20. package/src/commands/index.ts +31 -0
  21. package/src/commands/init-command.ts +365 -0
  22. package/src/commands/log-command.ts +549 -0
  23. package/src/commands/ls-remote-command.ts +237 -0
  24. package/src/commands/merge-command.ts +750 -0
  25. package/src/commands/pack-refs-command.ts +101 -0
  26. package/src/commands/pull-command.ts +258 -0
  27. package/src/commands/push-command.ts +682 -0
  28. package/src/commands/rebase-command.ts +665 -0
  29. package/src/commands/reflog-command.ts +68 -0
  30. package/src/commands/remote-command.ts +385 -0
  31. package/src/commands/reset-command.ts +292 -0
  32. package/src/commands/revert-command.ts +552 -0
  33. package/src/commands/rm-command.ts +178 -0
  34. package/src/commands/stash-apply-command.ts +402 -0
  35. package/src/commands/stash-create-command.ts +339 -0
  36. package/src/commands/stash-drop-command.ts +115 -0
  37. package/src/commands/stash-list-command.ts +116 -0
  38. package/src/commands/status-command.ts +173 -0
  39. package/src/commands/tag-command.ts +378 -0
  40. package/src/commands/tree-restore.ts +126 -0
  41. package/src/core-commands/add.command.impl.ts +274 -0
  42. package/src/core-commands/add.command.ts +81 -0
  43. package/src/core-commands/checkout.command.impl.ts +586 -0
  44. package/src/core-commands/checkout.command.ts +125 -0
  45. package/src/core-commands/index.ts +13 -0
  46. package/src/errors/add-errors.ts +20 -0
  47. package/src/errors/checkout-errors.ts +42 -0
  48. package/src/errors/command-errors.ts +68 -0
  49. package/src/errors/commit-errors.ts +40 -0
  50. package/src/errors/git-api-error.ts +11 -0
  51. package/src/errors/index.ts +12 -0
  52. package/src/errors/merge-errors.ts +94 -0
  53. package/src/errors/rebase-errors.ts +34 -0
  54. package/src/errors/ref-errors.ts +100 -0
  55. package/src/errors/remote-errors.ts +27 -0
  56. package/src/errors/stash-errors.ts +42 -0
  57. package/src/errors/tag-errors.ts +16 -0
  58. package/src/errors/transport-errors.ts +68 -0
  59. package/src/git-command.ts +421 -0
  60. package/src/git.ts +910 -0
  61. package/src/index.ts +18 -0
  62. package/src/pack-import/index.ts +8 -0
  63. package/src/pack-import/pack-import.ts +24 -0
  64. package/src/remote-config/index.ts +12 -0
  65. package/src/remote-config/remote-config-store.ts +285 -0
  66. package/src/rename/index.ts +5 -0
  67. package/src/rename/similarity-index.ts +185 -0
  68. package/src/results/cherry-pick-result.ts +35 -0
  69. package/src/results/clone-result.ts +25 -0
  70. package/src/results/diff-entry.ts +162 -0
  71. package/src/results/diff-formatter.ts +416 -0
  72. package/src/results/fetch-result.ts +91 -0
  73. package/src/results/index.ts +13 -0
  74. package/src/results/init-result.ts +29 -0
  75. package/src/results/merge-result.ts +135 -0
  76. package/src/results/pull-result.ts +27 -0
  77. package/src/results/push-result.ts +86 -0
  78. package/src/results/rebase-result.ts +140 -0
  79. package/src/results/revert-result.ts +35 -0
  80. package/src/results/stash-result.ts +60 -0
  81. package/src/results/status-result.ts +65 -0
  82. package/src/transport-command.ts +125 -0
  83. package/src/tree-merge/index.ts +8 -0
  84. package/src/tree-merge/tree-merge.ts +249 -0
  85. package/src/types.ts +70 -0
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Errors for AddCommand operations.
3
+ *
4
+ * Based on JGit's add-related exception classes.
5
+ */
6
+
7
+ import { GitApiError } from "./git-api-error.js";
8
+
9
+ /**
10
+ * Thrown when AddCommand is called without file patterns
11
+ * and not in update or all mode.
12
+ *
13
+ * Equivalent to JGit's NoFilepatternException.
14
+ */
15
+ export class NoFilepatternError extends GitApiError {
16
+ constructor(message = "At least one file pattern is required") {
17
+ super(message);
18
+ this.name = "NoFilepatternError";
19
+ }
20
+ }
@@ -0,0 +1,42 @@
1
+ import { GitApiError } from "./git-api-error.js";
2
+
3
+ /**
4
+ * Thrown when a path is not found in the index during checkout.
5
+ */
6
+ export class PathNotInIndexError extends GitApiError {
7
+ readonly path: string;
8
+
9
+ constructor(path: string, message?: string) {
10
+ super(message ?? `Path not in index: ${path}`);
11
+ this.name = "PathNotInIndexError";
12
+ this.path = path;
13
+ }
14
+ }
15
+
16
+ /**
17
+ * Thrown when a path is not found in the tree during checkout.
18
+ */
19
+ export class PathNotFoundInTreeError extends GitApiError {
20
+ readonly path: string;
21
+ readonly treeish?: string;
22
+
23
+ constructor(path: string, treeish?: string, message?: string) {
24
+ super(message ?? `Path not found in tree: ${path}`);
25
+ this.name = "PathNotFoundInTreeError";
26
+ this.path = path;
27
+ this.treeish = treeish;
28
+ }
29
+ }
30
+
31
+ /**
32
+ * Thrown when a path is expected to be a directory but is not.
33
+ */
34
+ export class NotADirectoryError extends GitApiError {
35
+ readonly path: string;
36
+
37
+ constructor(path: string, message?: string) {
38
+ super(message ?? `Not a directory: ${path}`);
39
+ this.name = "NotADirectoryError";
40
+ this.path = path;
41
+ }
42
+ }
@@ -0,0 +1,68 @@
1
+ import { GitApiError } from "./git-api-error.js";
2
+
3
+ /**
4
+ * Thrown when a required command argument is missing.
5
+ */
6
+ export class MissingArgumentError extends GitApiError {
7
+ readonly argumentName: string;
8
+
9
+ constructor(argumentName: string, message?: string) {
10
+ super(message ?? `Missing required argument: ${argumentName}`);
11
+ this.name = "MissingArgumentError";
12
+ this.argumentName = argumentName;
13
+ }
14
+ }
15
+
16
+ /**
17
+ * Thrown when a command argument has an invalid value.
18
+ */
19
+ export class InvalidArgumentError extends GitApiError {
20
+ readonly argumentName: string;
21
+ readonly value: unknown;
22
+
23
+ constructor(argumentName: string, value: unknown, message?: string) {
24
+ super(message ?? `Invalid value for ${argumentName}: ${value}`);
25
+ this.name = "InvalidArgumentError";
26
+ this.argumentName = argumentName;
27
+ this.value = value;
28
+ }
29
+ }
30
+
31
+ /**
32
+ * Thrown when incompatible command options are used together.
33
+ */
34
+ export class IncompatibleOptionsError extends GitApiError {
35
+ readonly options: string[];
36
+
37
+ constructor(options: string[], message?: string) {
38
+ super(message ?? `Cannot combine options: ${options.join(", ")}`);
39
+ this.name = "IncompatibleOptionsError";
40
+ this.options = options;
41
+ }
42
+ }
43
+
44
+ /**
45
+ * Thrown when a feature is not yet implemented.
46
+ */
47
+ export class NotImplementedError extends GitApiError {
48
+ readonly feature: string;
49
+
50
+ constructor(feature: string, message?: string) {
51
+ super(message ?? `${feature} is not yet implemented`);
52
+ this.name = "NotImplementedError";
53
+ this.feature = feature;
54
+ }
55
+ }
56
+
57
+ /**
58
+ * Thrown when a required store or service is not available.
59
+ */
60
+ export class StoreNotAvailableError extends GitApiError {
61
+ readonly storeName: string;
62
+
63
+ constructor(storeName: string, message?: string) {
64
+ super(message ?? `${storeName} is not available`);
65
+ this.name = "StoreNotAvailableError";
66
+ this.storeName = storeName;
67
+ }
68
+ }
@@ -0,0 +1,40 @@
1
+ import { GitApiError } from "./git-api-error.js";
2
+
3
+ /**
4
+ * Thrown when commit message is missing.
5
+ *
6
+ * Based on JGit's NoMessageException.
7
+ */
8
+ export class NoMessageError extends GitApiError {
9
+ constructor(message?: string) {
10
+ super(message ?? "Commit message is required");
11
+ this.name = "NoMessageError";
12
+ }
13
+ }
14
+
15
+ /**
16
+ * Thrown when trying to create an empty commit without allow-empty.
17
+ *
18
+ * Based on JGit's EmptyCommitException.
19
+ */
20
+ export class EmptyCommitError extends GitApiError {
21
+ constructor(message?: string) {
22
+ super(message ?? "Nothing to commit");
23
+ this.name = "EmptyCommitError";
24
+ }
25
+ }
26
+
27
+ /**
28
+ * Thrown when there are unmerged paths that prevent commit.
29
+ *
30
+ * Based on JGit's UnmergedPathsException (internal to commit).
31
+ */
32
+ export class UnmergedPathsError extends GitApiError {
33
+ readonly paths: string[];
34
+
35
+ constructor(paths: string[] = [], message?: string) {
36
+ super(message ?? "Cannot commit with unresolved conflicts");
37
+ this.name = "UnmergedPathsError";
38
+ this.paths = paths;
39
+ }
40
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Base exception for all Git API errors.
3
+ *
4
+ * Based on JGit's GitAPIException hierarchy.
5
+ */
6
+ export class GitApiError extends Error {
7
+ constructor(message: string, options?: ErrorOptions) {
8
+ super(message, options);
9
+ this.name = "GitApiError";
10
+ }
11
+ }
@@ -0,0 +1,12 @@
1
+ export * from "./add-errors.js";
2
+ export * from "./checkout-errors.js";
3
+ export * from "./command-errors.js";
4
+ export * from "./commit-errors.js";
5
+ export * from "./git-api-error.js";
6
+ export * from "./merge-errors.js";
7
+ export * from "./rebase-errors.js";
8
+ export * from "./ref-errors.js";
9
+ export * from "./remote-errors.js";
10
+ export * from "./stash-errors.js";
11
+ export * from "./tag-errors.js";
12
+ export * from "./transport-errors.js";
@@ -0,0 +1,94 @@
1
+ import { GitApiError } from "./git-api-error.js";
2
+
3
+ /**
4
+ * Thrown when merge cannot proceed due to uncommitted changes.
5
+ *
6
+ * Based on JGit's CheckoutConflictException.
7
+ */
8
+ export class MergeConflictError extends GitApiError {
9
+ readonly conflicts: string[];
10
+
11
+ constructor(conflicts: string[] = [], message?: string) {
12
+ super(message ?? `Merge conflicts in ${conflicts.length} file(s)`);
13
+ this.name = "MergeConflictError";
14
+ this.conflicts = conflicts;
15
+ }
16
+ }
17
+
18
+ /**
19
+ * Thrown when no merge heads are specified.
20
+ *
21
+ * Based on JGit's InvalidMergeHeadsException.
22
+ */
23
+ export class InvalidMergeHeadsError extends GitApiError {
24
+ constructor(message?: string) {
25
+ super(message ?? "No merge heads specified");
26
+ this.name = "InvalidMergeHeadsError";
27
+ }
28
+ }
29
+
30
+ /**
31
+ * Thrown when fast-forward merge is requested but not possible.
32
+ *
33
+ * Based on JGit's merge behavior with FF_ONLY mode.
34
+ */
35
+ export class NotFastForwardError extends GitApiError {
36
+ constructor(message?: string) {
37
+ super(message ?? "Cannot fast-forward merge; branches have diverged");
38
+ this.name = "NotFastForwardError";
39
+ }
40
+ }
41
+
42
+ /**
43
+ * Thrown when cherry-picking/reverting a merge commit without specifying parent.
44
+ *
45
+ * Based on JGit's MultipleParentsNotAllowedException.
46
+ */
47
+ export class MultipleParentsNotAllowedError extends GitApiError {
48
+ constructor(message?: string) {
49
+ super(message ?? "Cannot cherry-pick merge commit without specifying mainline parent");
50
+ this.name = "MultipleParentsNotAllowedError";
51
+ }
52
+ }
53
+
54
+ /**
55
+ * Failure reasons for merge operations.
56
+ *
57
+ * Based on JGit's ResolveMerger.MergeFailureReason.
58
+ */
59
+ export enum MergeFailureReason {
60
+ /** Could not delete existing file on disk */
61
+ COULD_NOT_DELETE = "could-not-delete",
62
+ /** Working tree file was dirty (uncommitted changes) */
63
+ DIRTY_WORKTREE = "dirty-worktree",
64
+ /** Index had uncommitted changes */
65
+ DIRTY_INDEX = "dirty-index",
66
+ }
67
+
68
+ /**
69
+ * Thrown when no merge base can be found between commits.
70
+ */
71
+ export class NoMergeBaseError extends GitApiError {
72
+ readonly commits: string[];
73
+
74
+ constructor(commits: string[] = [], message?: string) {
75
+ super(message ?? "No merge base found");
76
+ this.name = "NoMergeBaseError";
77
+ this.commits = commits;
78
+ }
79
+ }
80
+
81
+ /**
82
+ * Thrown when mainline parent is invalid for cherry-pick or revert.
83
+ */
84
+ export class InvalidMainlineParentError extends GitApiError {
85
+ readonly parent: number;
86
+ readonly maxParents: number;
87
+
88
+ constructor(parent: number, maxParents: number, message?: string) {
89
+ super(message ?? `Invalid mainline parent: ${parent} (commit has ${maxParents} parent(s))`);
90
+ this.name = "InvalidMainlineParentError";
91
+ this.parent = parent;
92
+ this.maxParents = maxParents;
93
+ }
94
+ }
@@ -0,0 +1,34 @@
1
+ import { GitApiError } from "./git-api-error.js";
2
+
3
+ /**
4
+ * Thrown when a rebase operation is attempted but no rebase is in progress.
5
+ */
6
+ export class NoRebaseInProgressError extends GitApiError {
7
+ constructor(message?: string) {
8
+ super(message ?? "No rebase in progress");
9
+ this.name = "NoRebaseInProgressError";
10
+ }
11
+ }
12
+
13
+ /**
14
+ * Thrown when the upstream commit is required but not set.
15
+ */
16
+ export class UpstreamRequiredError extends GitApiError {
17
+ constructor(message?: string) {
18
+ super(message ?? "Upstream commit is required for rebase");
19
+ this.name = "UpstreamRequiredError";
20
+ }
21
+ }
22
+
23
+ /**
24
+ * Thrown when a commit cannot be found during rebase.
25
+ */
26
+ export class CommitNotFoundError extends GitApiError {
27
+ readonly commitRef: string;
28
+
29
+ constructor(commitRef: string, message?: string) {
30
+ super(message ?? `Cannot find commit: ${commitRef}`);
31
+ this.name = "CommitNotFoundError";
32
+ this.commitRef = commitRef;
33
+ }
34
+ }
@@ -0,0 +1,100 @@
1
+ import { GitApiError } from "./git-api-error.js";
2
+
3
+ /**
4
+ * Thrown when a ref name is invalid.
5
+ *
6
+ * Based on JGit's InvalidRefNameException.
7
+ */
8
+ export class InvalidRefNameError extends GitApiError {
9
+ readonly refName: string;
10
+
11
+ constructor(refName: string, message?: string) {
12
+ super(message ?? `Invalid ref name: ${refName}`);
13
+ this.name = "InvalidRefNameError";
14
+ this.refName = refName;
15
+ }
16
+ }
17
+
18
+ /**
19
+ * Thrown when a ref already exists and force is not set.
20
+ *
21
+ * Based on JGit's RefAlreadyExistsException.
22
+ */
23
+ export class RefAlreadyExistsError extends GitApiError {
24
+ readonly refName: string;
25
+
26
+ constructor(refName: string, message?: string) {
27
+ super(message ?? `Ref already exists: ${refName}`);
28
+ this.name = "RefAlreadyExistsError";
29
+ this.refName = refName;
30
+ }
31
+ }
32
+
33
+ /**
34
+ * Thrown when a ref cannot be found.
35
+ *
36
+ * Based on JGit's RefNotFoundException.
37
+ */
38
+ export class RefNotFoundError extends GitApiError {
39
+ readonly refName: string;
40
+
41
+ constructor(refName: string, message?: string) {
42
+ super(message ?? `Ref not found: ${refName}`);
43
+ this.name = "RefNotFoundError";
44
+ this.refName = refName;
45
+ }
46
+ }
47
+
48
+ /**
49
+ * Thrown when trying to delete the current branch.
50
+ *
51
+ * Based on JGit's CannotDeleteCurrentBranchException.
52
+ */
53
+ export class CannotDeleteCurrentBranchError extends GitApiError {
54
+ readonly branchName: string;
55
+
56
+ constructor(branchName: string, message?: string) {
57
+ super(message ?? `Cannot delete the branch you are currently on: ${branchName}`);
58
+ this.name = "CannotDeleteCurrentBranchError";
59
+ this.branchName = branchName;
60
+ }
61
+ }
62
+
63
+ /**
64
+ * Thrown when HEAD is detached and an operation requires a branch.
65
+ *
66
+ * Based on JGit's DetachedHeadException.
67
+ */
68
+ export class DetachedHeadError extends GitApiError {
69
+ constructor(message?: string) {
70
+ super(message ?? "HEAD is detached");
71
+ this.name = "DetachedHeadError";
72
+ }
73
+ }
74
+
75
+ /**
76
+ * Thrown when HEAD ref cannot be found or resolved.
77
+ *
78
+ * Based on JGit's NoHeadException.
79
+ */
80
+ export class NoHeadError extends GitApiError {
81
+ constructor(message?: string) {
82
+ super(message ?? "No HEAD ref found");
83
+ this.name = "NoHeadError";
84
+ }
85
+ }
86
+
87
+ /**
88
+ * Thrown when branch has not been fully merged.
89
+ *
90
+ * Based on JGit's NotMergedException.
91
+ */
92
+ export class NotMergedError extends GitApiError {
93
+ readonly branchName: string;
94
+
95
+ constructor(branchName: string, message?: string) {
96
+ super(message ?? `Branch '${branchName}' is not fully merged`);
97
+ this.name = "NotMergedError";
98
+ this.branchName = branchName;
99
+ }
100
+ }
@@ -0,0 +1,27 @@
1
+ import { GitApiError } from "./git-api-error.js";
2
+
3
+ /**
4
+ * Thrown when a remote already exists.
5
+ */
6
+ export class RemoteAlreadyExistsError extends GitApiError {
7
+ readonly remoteName: string;
8
+
9
+ constructor(remoteName: string, message?: string) {
10
+ super(message ?? `Remote '${remoteName}' already exists`);
11
+ this.name = "RemoteAlreadyExistsError";
12
+ this.remoteName = remoteName;
13
+ }
14
+ }
15
+
16
+ /**
17
+ * Thrown when a remote does not exist.
18
+ */
19
+ export class RemoteNotFoundError extends GitApiError {
20
+ readonly remoteName: string;
21
+
22
+ constructor(remoteName: string, message?: string) {
23
+ super(message ?? `Remote '${remoteName}' does not exist`);
24
+ this.name = "RemoteNotFoundError";
25
+ this.remoteName = remoteName;
26
+ }
27
+ }
@@ -0,0 +1,42 @@
1
+ import { GitApiError } from "./git-api-error.js";
2
+
3
+ /**
4
+ * Thrown when a stash index is invalid.
5
+ */
6
+ export class InvalidStashIndexError extends GitApiError {
7
+ readonly index: number;
8
+
9
+ constructor(index: number, message?: string) {
10
+ super(message ?? `Invalid stash index: ${index}`);
11
+ this.name = "InvalidStashIndexError";
12
+ this.index = index;
13
+ }
14
+ }
15
+
16
+ /**
17
+ * Thrown when a stash reference cannot be found.
18
+ */
19
+ export class StashNotFoundError extends GitApiError {
20
+ readonly stashRef: string;
21
+
22
+ constructor(stashRef: string, message?: string) {
23
+ super(message ?? `Stash not found: ${stashRef}`);
24
+ this.name = "StashNotFoundError";
25
+ this.stashRef = stashRef;
26
+ }
27
+ }
28
+
29
+ /**
30
+ * Thrown when applying a stash fails due to conflicts or other issues.
31
+ */
32
+ export class StashApplyFailedError extends GitApiError {
33
+ readonly stashRef: string;
34
+ readonly conflicts?: string[];
35
+
36
+ constructor(stashRef: string, conflicts?: string[], message?: string) {
37
+ super(message ?? `Failed to apply stash: ${stashRef}`);
38
+ this.name = "StashApplyFailedError";
39
+ this.stashRef = stashRef;
40
+ this.conflicts = conflicts;
41
+ }
42
+ }
@@ -0,0 +1,16 @@
1
+ import { GitApiError } from "./git-api-error.js";
2
+
3
+ /**
4
+ * Thrown when a tag name is invalid.
5
+ *
6
+ * Based on JGit's InvalidTagNameException.
7
+ */
8
+ export class InvalidTagNameError extends GitApiError {
9
+ readonly tagName: string;
10
+
11
+ constructor(tagName: string, message?: string) {
12
+ super(message ?? `Invalid tag name: ${tagName}`);
13
+ this.name = "InvalidTagNameError";
14
+ this.tagName = tagName;
15
+ }
16
+ }
@@ -0,0 +1,68 @@
1
+ import { GitApiError } from "./git-api-error.js";
2
+
3
+ /**
4
+ * Error thrown when a remote cannot be resolved.
5
+ *
6
+ * Based on JGit's InvalidRemoteException.
7
+ */
8
+ export class InvalidRemoteError extends GitApiError {
9
+ readonly remote: string;
10
+
11
+ constructor(remote: string, message?: string) {
12
+ super(message ?? `Invalid remote: ${remote}`);
13
+ this.name = "InvalidRemoteError";
14
+ this.remote = remote;
15
+ }
16
+ }
17
+
18
+ /**
19
+ * Error thrown when a transport operation fails.
20
+ *
21
+ * Based on JGit's TransportException.
22
+ */
23
+ export class TransportError extends GitApiError {
24
+ readonly uri?: string;
25
+
26
+ constructor(message: string, uri?: string) {
27
+ super(uri ? `${uri}: ${message}` : message);
28
+ this.name = "TransportError";
29
+ this.uri = uri;
30
+ }
31
+ }
32
+
33
+ /**
34
+ * Error thrown when authentication fails.
35
+ */
36
+ export class AuthenticationError extends TransportError {
37
+ constructor(uri: string, message?: string) {
38
+ super(message ?? "Authentication failed", uri);
39
+ this.name = "AuthenticationError";
40
+ }
41
+ }
42
+
43
+ /**
44
+ * Error thrown when a push is rejected.
45
+ *
46
+ * Based on JGit's RejectedCommandException.
47
+ */
48
+ export class PushRejectedException extends TransportError {
49
+ readonly refName: string;
50
+ readonly reason: string;
51
+
52
+ constructor(refName: string, reason: string, uri?: string) {
53
+ super(`${refName}: ${reason}`, uri);
54
+ this.name = "PushRejectedException";
55
+ this.refName = refName;
56
+ this.reason = reason;
57
+ }
58
+ }
59
+
60
+ /**
61
+ * Error thrown when push is not allowed (non-fast-forward without force).
62
+ */
63
+ export class NonFastForwardError extends PushRejectedException {
64
+ constructor(refName: string, uri?: string) {
65
+ super(refName, "non-fast-forward update rejected", uri);
66
+ this.name = "NonFastForwardError";
67
+ }
68
+ }