@openvcs/git-plugin 0.2.0-edge.20260427.42 → 0.2.0-edge.20260501.46
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/bin/git.js +7 -1
- package/package.json +12 -3
- package/src/git.ts +7 -1
package/bin/git.js
CHANGED
|
@@ -198,12 +198,18 @@ export class GitCommand {
|
|
|
198
198
|
}
|
|
199
199
|
this.runChecked(['add', '-A', '--', ...paths], 'git-stage-paths-failed');
|
|
200
200
|
}
|
|
201
|
+
/**
|
|
202
|
+
* Lists commits from Git with an optional cap.
|
|
203
|
+
*
|
|
204
|
+
* A non-positive limit skips the `-n` flag so callers can request the full
|
|
205
|
+
* history without hard-capping the result set.
|
|
206
|
+
*/
|
|
201
207
|
listCommits(options = {}) {
|
|
202
208
|
const args = ['log', '--all'];
|
|
203
209
|
if (options.topo_order) {
|
|
204
210
|
args.push('--topo-order');
|
|
205
211
|
}
|
|
206
|
-
if (options.limit !== undefined) {
|
|
212
|
+
if (options.limit !== undefined && options.limit > 0) {
|
|
207
213
|
args.push(`-${options.limit}`);
|
|
208
214
|
}
|
|
209
215
|
if (options.skip !== undefined) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openvcs/git-plugin",
|
|
3
|
-
"version": "0.2.0-edge.
|
|
3
|
+
"version": "0.2.0-edge.20260501.46",
|
|
4
4
|
"description": "OpenVCS Git plugin - Node.js runtime",
|
|
5
5
|
"license": "GPL-3.0-or-later",
|
|
6
6
|
"homepage": "https://github.com/Open-VCS/OpenVCS-Plugin-Git",
|
|
@@ -18,14 +18,23 @@
|
|
|
18
18
|
"openvcs": {
|
|
19
19
|
"id": "openvcs.git",
|
|
20
20
|
"name": "Git",
|
|
21
|
-
"version": "0.2.0-edge.
|
|
21
|
+
"version": "0.2.0-edge.20260501.46",
|
|
22
22
|
"author": "OpenVCS Contributors",
|
|
23
23
|
"description": "Git VCS backend plugin for OpenVCS",
|
|
24
24
|
"default_enabled": true,
|
|
25
25
|
"module": {
|
|
26
26
|
"exec": "openvcs-git-plugin.js",
|
|
27
27
|
"vcs_backends": [
|
|
28
|
-
|
|
28
|
+
{
|
|
29
|
+
"id": "git",
|
|
30
|
+
"name": "Git",
|
|
31
|
+
"action_labels": {
|
|
32
|
+
"VCS.Commit": "Commit",
|
|
33
|
+
"VCS.Fetch": "Fetch",
|
|
34
|
+
"VCS.Pull": "Pull",
|
|
35
|
+
"VCS.Push": "Push"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
29
38
|
]
|
|
30
39
|
}
|
|
31
40
|
},
|
package/src/git.ts
CHANGED
|
@@ -317,6 +317,12 @@ export class GitCommand {
|
|
|
317
317
|
this.runChecked(['add', '-A', '--', ...paths], 'git-stage-paths-failed');
|
|
318
318
|
}
|
|
319
319
|
|
|
320
|
+
/**
|
|
321
|
+
* Lists commits from Git with an optional cap.
|
|
322
|
+
*
|
|
323
|
+
* A non-positive limit skips the `-n` flag so callers can request the full
|
|
324
|
+
* history without hard-capping the result set.
|
|
325
|
+
*/
|
|
320
326
|
listCommits(options: ListCommitsOptions = {}): { commits: CommitEntry[]; exitCode: number } {
|
|
321
327
|
const args = ['log', '--all'];
|
|
322
328
|
|
|
@@ -324,7 +330,7 @@ export class GitCommand {
|
|
|
324
330
|
args.push('--topo-order');
|
|
325
331
|
}
|
|
326
332
|
|
|
327
|
-
if (options.limit !== undefined) {
|
|
333
|
+
if (options.limit !== undefined && options.limit > 0) {
|
|
328
334
|
args.push(`-${options.limit}`);
|
|
329
335
|
}
|
|
330
336
|
|