@openvcs/git-plugin 0.1.0-edge.20260423.31 → 0.1.0-edge.20260426.35
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 +4 -2
- package/package.json +2 -2
- package/src/git.ts +4 -2
package/bin/git.js
CHANGED
|
@@ -401,9 +401,10 @@ export class GitCommand {
|
|
|
401
401
|
resetSoftTo(ref) {
|
|
402
402
|
this.runChecked(['reset', '--soft', ref], 'git-reset-soft-failed');
|
|
403
403
|
}
|
|
404
|
+
/** Reads the effective Git commit identity from config. */
|
|
404
405
|
getIdentity() {
|
|
405
|
-
const nameResult = this.run(['config', '--
|
|
406
|
-
const emailResult = this.run(['config', '--
|
|
406
|
+
const nameResult = this.run(['config', '--get', 'user.name']);
|
|
407
|
+
const emailResult = this.run(['config', '--get', 'user.email']);
|
|
407
408
|
if (nameResult.status !== 0 || emailResult.status !== 0) {
|
|
408
409
|
return null;
|
|
409
410
|
}
|
|
@@ -412,6 +413,7 @@ export class GitCommand {
|
|
|
412
413
|
email: emailResult.stdout.trim(),
|
|
413
414
|
};
|
|
414
415
|
}
|
|
416
|
+
/** Stores repository-local commit identity in Git config. */
|
|
415
417
|
setIdentityLocal(name, email) {
|
|
416
418
|
this.runChecked(['config', '--local', 'user.name', name], 'git-identity-set-failed');
|
|
417
419
|
this.runChecked(['config', '--local', 'user.email', email], 'git-identity-set-failed');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openvcs/git-plugin",
|
|
3
|
-
"version": "0.1.0-edge.
|
|
3
|
+
"version": "0.1.0-edge.20260426.35",
|
|
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,7 +18,7 @@
|
|
|
18
18
|
"openvcs": {
|
|
19
19
|
"id": "openvcs.git",
|
|
20
20
|
"name": "Git",
|
|
21
|
-
"version": "0.1.0-edge.
|
|
21
|
+
"version": "0.1.0-edge.20260426.35",
|
|
22
22
|
"author": "OpenVCS Contributors",
|
|
23
23
|
"description": "Git VCS backend plugin for OpenVCS",
|
|
24
24
|
"default_enabled": true,
|
package/src/git.ts
CHANGED
|
@@ -562,9 +562,10 @@ export class GitCommand {
|
|
|
562
562
|
this.runChecked(['reset', '--soft', ref], 'git-reset-soft-failed');
|
|
563
563
|
}
|
|
564
564
|
|
|
565
|
+
/** Reads the effective Git commit identity from config. */
|
|
565
566
|
getIdentity(): { name: string; email: string } | null {
|
|
566
|
-
const nameResult = this.run(['config', '--
|
|
567
|
-
const emailResult = this.run(['config', '--
|
|
567
|
+
const nameResult = this.run(['config', '--get', 'user.name']);
|
|
568
|
+
const emailResult = this.run(['config', '--get', 'user.email']);
|
|
568
569
|
|
|
569
570
|
if (nameResult.status !== 0 || emailResult.status !== 0) {
|
|
570
571
|
return null;
|
|
@@ -576,6 +577,7 @@ export class GitCommand {
|
|
|
576
577
|
};
|
|
577
578
|
}
|
|
578
579
|
|
|
580
|
+
/** Stores repository-local commit identity in Git config. */
|
|
579
581
|
setIdentityLocal(name: string, email: string): void {
|
|
580
582
|
this.runChecked(['config', '--local', 'user.name', name], 'git-identity-set-failed');
|
|
581
583
|
this.runChecked(['config', '--local', 'user.email', email], 'git-identity-set-failed');
|