Git - do not show "Open on GitHub" action for commits that have not been pushed to the remote (#237605)

This commit is contained in:
Ladislau Szomoru
2025-01-09 15:20:57 -08:00
committed by GitHub
parent ddf3841046
commit a26fe3e466
4 changed files with 45 additions and 2 deletions
+9
View File
@@ -2848,6 +2848,15 @@ export class Repository {
return commits[0];
}
async revList(ref1: string, ref2: string): Promise<string[]> {
const result = await this.exec(['rev-list', `${ref1}..${ref2}`]);
if (result.stderr) {
return [];
}
return result.stdout.trim().split('\n');
}
async revParse(ref: string): Promise<string | undefined> {
try {
const result = await fs.readFile(path.join(this.dotGit.path, ref), 'utf8');