@ibgib/vcs-gib 0.0.36 → 0.0.41

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.
@@ -42,40 +42,38 @@ export async function executeMergeCmd({
42
42
  const lc = `${lcFile}[${executeMergeCmd.name}]`;
43
43
  try {
44
44
  if (logalot) {
45
- console.log(`${lc} starting... (I: genuuid)`);
45
+ console.log(`${lc} starting... (I: d14fb7ac187875d165abcbf8fe51ce26)`);
46
46
  }
47
47
 
48
48
  const trimmedIncomingBranchName = incomingBranchName?.trim();
49
49
  if (!trimmedIncomingBranchName) {
50
- throw new Error(`Branch name is required for merge (E: genuuid)`);
50
+ throw new Error(`Branch name is required for merge (E: f47fd65e49a8518da859217ae1bef826)`);
51
51
  }
52
52
 
53
53
  const absTargetDir = path.resolve(targetDir);
54
54
  const { repo, vcsPath, activeWorktreeDir } =
55
55
  await openVcsRepository({ targetDir: absTargetDir, vcsFolderName });
56
56
 
57
- // todo: get baseBranchName based off of targetDir?
58
- const baseBranchName = await repo.getActiveBranchName();
57
+ const indexIbGib = await repo.getIndexIbGib();
58
+ const baseBranchName = await repo.getActiveBranchName({ indexIbGib, targetDir: absTargetDir });
59
59
 
60
60
  const incomingSpaceRes = await getOrCreateBranchSpace({
61
61
  metaspace: repo.metaspace,
62
62
  branchName: trimmedIncomingBranchName,
63
63
  });
64
64
 
65
- const activeBranchSpace = await repo.getActiveBranchSpace();
65
+ const activeBranchSpace = await repo.getActiveBranchSpace({ indexIbGib, targetDir: absTargetDir });
66
66
  const activeBranchSpaceId = getSpaceIdFromIb(activeBranchSpace.ib);
67
67
 
68
68
  const mergeRes = await repo.merge({
69
- baseBranchSpace: activeBranchSpace, // what should this be? always the active one? Or does the working dir determine it? What is absTargetDir?
70
- // message,
71
- // repoRoot,
69
+ baseBranchSpace: activeBranchSpace,
72
70
  incomingBranchName: trimmedIncomingBranchName,
73
71
  incomingBranchSpace: incomingSpaceRes.space,
74
72
  targetDir: absTargetDir,
75
73
  });
76
74
 
77
75
  if (!quiet) {
78
- console.log(`Successfully merged branch '${trimmedIncomingBranchName}' into '${baseBranchName}' (I: genuuid)`);
76
+ console.log(`Successfully merged branch '${trimmedIncomingBranchName}' into '${baseBranchName}' (I: 943c67d40bb8a3177d470da667571726)`);
79
77
  console.log(` Worktree projection: ${activeWorktreeDir}`);
80
78
  }
81
79
 
@@ -89,11 +87,11 @@ export async function executeMergeCmd({
89
87
  worktreePath: activeWorktreeDir,
90
88
  };
91
89
  } catch (error) {
92
- console.error(`${lc} ${extractErrorMsg(error)} (E: genuuid)`);
90
+ console.error(`${lc} ${extractErrorMsg(error)} (E: acfb283f49f8e533586e0578ac9d4426)`);
93
91
  throw error;
94
92
  } finally {
95
93
  if (logalot) {
96
- console.log(`${lc} complete. (I: genuuid)`);
94
+ console.log(`${lc} complete. (I: 67210ef7c05454c19cdb6b08149b7326)`);
97
95
  }
98
96
  }
99
97
  }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @module status-cmd
3
- *
3
+ *
4
4
  * CLI command handler for `vcs status`.
5
5
  * Compares physical workspace state against active branch snapshot tip and in-band index staging area.
6
6
  */
@@ -8,7 +8,7 @@
8
8
  import path from 'node:path';
9
9
 
10
10
  import { extractErrorMsg } from '@ibgib/helper-gib/dist/helpers/utils-helper.mjs';
11
- import { VcsStatusItem, PendingCommentInfo } from '@ibgib/core-gib/dist/vcs/status/status-helper.mjs';
11
+ import { VcsStatusItem, PendingCommentInfo } from '@ibgib/core-gib/dist/vcs/status/status-types.mjs';
12
12
  import { openVcsRepository } from '../vcs-repo-helper.mjs';
13
13
  import { GLOBAL_LOG_A_LOT } from '../../vcs-gib-constants.mjs';
14
14
 
@@ -126,9 +126,11 @@ export async function main({
126
126
  case VCS_SUBCOMMANDS.LOG: {
127
127
  const targetDir = process.cwd();
128
128
  const filePath = parsed.positionals[0];
129
+ const branchName = parsed.flags.branchName;
129
130
  await executeLogCmd({
130
131
  targetDir,
131
132
  filePath,
133
+ branchName,
132
134
  allComments: parsed.flags.all,
133
135
  });
134
136
  break;