mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 11:08:51 +01:00
Git - fix data shape issue for the merge base (#242544)
This commit is contained in:
@@ -163,7 +163,7 @@ export class GitHistoryProvider implements SourceControlHistoryProvider, FileDec
|
||||
// Compute base if the branch has changed
|
||||
const mergeBase = await this.resolveHEADMergeBase();
|
||||
|
||||
this._currentHistoryItemBaseRef = mergeBase &&
|
||||
this._currentHistoryItemBaseRef = mergeBase && mergeBase.name && mergeBase.remote &&
|
||||
(mergeBase.remote !== this.repository.HEAD.upstream?.remote ||
|
||||
mergeBase.name !== this.repository.HEAD.upstream?.name) ? {
|
||||
id: `refs/remotes/${mergeBase.remote}/${mergeBase.name}`,
|
||||
|
||||
@@ -1533,7 +1533,11 @@ export class Repository implements Disposable {
|
||||
try {
|
||||
const mergeBase = await this.getConfig(mergeBaseConfigKey);
|
||||
const branchFromConfig = mergeBase !== '' ? await this.getBranch(mergeBase) : undefined;
|
||||
if (branchFromConfig) {
|
||||
|
||||
// There was a brief period of time when we would consider local branches as a valid
|
||||
// merge base. Since then we have fixed the issue and only remote branches can be used
|
||||
// as a merge base so we are adding an additional check.
|
||||
if (branchFromConfig && branchFromConfig.remote) {
|
||||
return branchFromConfig;
|
||||
}
|
||||
} catch (err) { }
|
||||
|
||||
Reference in New Issue
Block a user