Skip to content

Commit 2e21283

Browse files
committed
Improves local branch model
1 parent 960b7a3 commit 2e21283

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/env/node/git/sub-providers/branches.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { GitBranch } from '../../../../git/models/branch';
1313
import { getLocalBranchByUpstream, isDetachedHead } from '../../../../git/models/branch.utils';
1414
import type { MergeConflict } from '../../../../git/models/mergeConflict';
1515
import type { GitBranchReference } from '../../../../git/models/reference';
16+
import { getReferenceFromBranch } from '../../../../git/models/reference.utils';
1617
import { createRevisionRange } from '../../../../git/models/revision.utils';
1718
import { parseGitBranches } from '../../../../git/parsers/branchParser';
1819
import { parseMergeTreeConflict } from '../../../../git/parsers/mergeTreeParser';
@@ -334,7 +335,7 @@ export class BranchesGitSubProvider implements GitBranchesSubProvider {
334335
if (result.merged) {
335336
return {
336337
...result,
337-
localBranchOnly: { name: localIntoBranch.name },
338+
localBranchOnly: getReferenceFromBranch(localIntoBranch),
338339
};
339340
}
340341
}

src/git/gitProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ export type MergeDetectionConfidence = 'highest' | 'high' | 'medium';
374374

375375
export type GitBranchMergedStatus =
376376
| { merged: false }
377-
| { merged: true; confidence: MergeDetectionConfidence; localBranchOnly?: { name: string } };
377+
| { merged: true; confidence: MergeDetectionConfidence; localBranchOnly?: GitBranchReference };
378378

379379
export interface GitBranchesSubProvider {
380380
getBranch(repoPath: string, name?: string): Promise<GitBranch | undefined>;

0 commit comments

Comments
 (0)