@@ -161,10 +161,10 @@ export class DataSource extends Disposable {
161161 * @param stashes An array of all stashes in the repository.
162162 * @returns The commits in the repository.
163163 */
164- public getCommits ( repo : string , branches : ReadonlyArray < string > | null , authors : ReadonlyArray < string > | null , maxCommits : number , showTags : boolean , showRemoteBranches : boolean , includeCommitsMentionedByReflogs : boolean , onlyFollowFirstParent : boolean , commitOrdering : CommitOrdering , remotes : ReadonlyArray < string > , hideRemotes : ReadonlyArray < string > , stashes : ReadonlyArray < GitStash > ) : Promise < GitCommitData > {
164+ public getCommits ( repo : string , branches : ReadonlyArray < string > | null , authors : ReadonlyArray < string > | null , maxCommits : number , showTags : boolean , showRemoteBranches : boolean , includeCommitsMentionedByReflogs : boolean , onlyFollowFirstParent : boolean , commitOrdering : CommitOrdering , remotes : ReadonlyArray < string > , hideRemotes : ReadonlyArray < string > , stashes : ReadonlyArray < GitStash > , simplifyByDecoration : boolean ) : Promise < GitCommitData > {
165165 const config = getConfig ( ) ;
166166 return Promise . all ( [
167- this . getLog ( repo , branches , authors , maxCommits + 1 , showTags && config . showCommitsOnlyReferencedByTags , showRemoteBranches , includeCommitsMentionedByReflogs , onlyFollowFirstParent , commitOrdering , remotes , hideRemotes , stashes ) ,
167+ this . getLog ( repo , branches , authors , maxCommits + 1 , showTags && config . showCommitsOnlyReferencedByTags , showRemoteBranches , includeCommitsMentionedByReflogs , onlyFollowFirstParent , commitOrdering , remotes , hideRemotes , stashes , simplifyByDecoration ) ,
168168 this . getRefs ( repo , showRemoteBranches , config . showRemoteHeads , hideRemotes ) . then ( ( refData : GitRefData ) => refData , ( errorMessage : string ) => errorMessage )
169169 ] ) . then ( async ( results ) => {
170170 let commits : GitCommitRecord [ ] = results [ 0 ] , refData : GitRefData | string = results [ 1 ] , i ;
@@ -1543,8 +1543,11 @@ export class DataSource extends Disposable {
15431543 * @param stashes An array of all stashes in the repository.
15441544 * @returns An array of commits.
15451545 */
1546- private getLog ( repo : string , branches : ReadonlyArray < string > | null , authors : ReadonlyArray < string > | null , num : number , includeTags : boolean , includeRemotes : boolean , includeCommitsMentionedByReflogs : boolean , onlyFollowFirstParent : boolean , order : CommitOrdering , remotes : ReadonlyArray < string > , hideRemotes : ReadonlyArray < string > , stashes : ReadonlyArray < GitStash > ) {
1546+ private getLog ( repo : string , branches : ReadonlyArray < string > | null , authors : ReadonlyArray < string > | null , num : number , includeTags : boolean , includeRemotes : boolean , includeCommitsMentionedByReflogs : boolean , onlyFollowFirstParent : boolean , order : CommitOrdering , remotes : ReadonlyArray < string > , hideRemotes : ReadonlyArray < string > , stashes : ReadonlyArray < GitStash > , simplifyByDecoration : boolean ) {
15471547 const args = [ '-c' , 'log.showSignature=false' , 'log' , '--max-count=' + num , '--format=' + this . gitFormatLog , '--' + order + '-order' ] ;
1548+ if ( simplifyByDecoration ) {
1549+ args . push ( '--simplify-by-decoration' ) ;
1550+ }
15481551 if ( onlyFollowFirstParent ) {
15491552 args . push ( '--first-parent' ) ;
15501553 }
@@ -1561,6 +1564,7 @@ export class DataSource extends Disposable {
15611564 // Show All
15621565 args . push ( '--branches' ) ;
15631566 if ( includeTags ) args . push ( '--tags' ) ;
1567+ else if ( simplifyByDecoration ) args . push ( '--decorate-refs-exclude=refs/tags/' ) ;
15641568 if ( includeCommitsMentionedByReflogs ) args . push ( '--reflog' ) ;
15651569 if ( includeRemotes ) {
15661570 if ( hideRemotes . length === 0 ) {
0 commit comments