Parcourir la source

Ensures we always show all unpublished commits

main
Eric Amodio il y a 4 ans
Parent
révision
a9812541ab
1 fichiers modifiés avec 8 ajouts et 2 suppressions
  1. +8
    -2
      src/views/nodes/branchNode.ts

+ 8
- 2
src/views/nodes/branchNode.ts Voir le fichier

@ -168,7 +168,7 @@ export class BranchNode
}
let unpublished: GitLog | undefined;
if (this.branch.tracking && this.branch.state.ahead) {
if (this.branch.state.ahead > 0) {
unpublished = await Container.git.getLog(this.uri.repoPath!, {
limit: 0,
ref: GitRevision.createRange(this.branch.tracking, 'HEAD'),
@ -329,8 +329,14 @@ export class BranchNode
private _log: GitLog | undefined;
private async getLog() {
if (this._log == null) {
// Ensure we always show all unpublished commits (and the upstream tip)
let limit = this.limit ?? this.view.config.defaultItemLimit;
if (limit !== 0 && this.branch.state.ahead > limit) {
limit = this.branch.state.ahead + 1;
}
this._log = await Container.git.getLog(this.uri.repoPath!, {
limit: this.limit ?? this.view.config.defaultItemLimit,
limit: limit,
ref: this.ref.ref,
authors: this.options?.authors,
});

Chargement…
Annuler
Enregistrer