@@ -2435,9 +2435,9 @@ export class LocalGitProvider implements GitProvider, Disposable {
24352435 let stdin : string | undefined ;
24362436
24372437 // TODO@eamodio this is insanity -- there *HAS* to be a better way to get git log to return stashes
2438- const stash = getSettledValue ( stashResult ) ;
2439- if ( stash ?. commits . size ) {
2440- stashes = new Map ( stash . commits ) ;
2438+ const gitStash = getSettledValue ( stashResult ) ;
2439+ if ( gitStash ?. stashes . size ) {
2440+ stashes = new Map ( gitStash . stashes ) ;
24412441 stdin = join (
24422442 map ( stashes . values ( ) , c => c . sha . substring ( 0 , 9 ) ) ,
24432443 '\n' ,
@@ -2574,7 +2574,7 @@ export class LocalGitProvider implements GitProvider, Disposable {
25742574 let remote : GitRemote | undefined ;
25752575 let remoteBranchId : string ;
25762576 let remoteName : string ;
2577- let stashCommit : GitStashCommit | undefined ;
2577+ let stash : GitStashCommit | undefined ;
25782578 let stats : GitGraphRowsStats | undefined ;
25792579 let tagId : string ;
25802580 let tagName : string ;
@@ -2778,7 +2778,7 @@ export class LocalGitProvider implements GitProvider, Disposable {
27782778 }
27792779 }
27802780
2781- stashCommit = stash ?. commits . get ( commit . sha ) ;
2781+ stash = gitStash ?. stashes . get ( commit . sha ) ;
27822782
27832783 parents = commit . parents ? commit . parents . split ( ' ' ) : [ ] ;
27842784 if ( reachableFromHEAD . has ( commit . sha ) ) {
@@ -2788,15 +2788,15 @@ export class LocalGitProvider implements GitProvider, Disposable {
27882788 }
27892789
27902790 // Remove the second & third parent, if exists, from each stash commit as it is a Git implementation for the index and untracked files
2791- if ( stashCommit != null && parents . length > 1 ) {
2791+ if ( stash != null && parents . length > 1 ) {
27922792 // Remap the "index commit" (e.g. contains staged files) of the stash
27932793 remappedIds . set ( parents [ 1 ] , commit . sha ) ;
27942794 // Remap the "untracked commit" (e.g. contains untracked files) of the stash
27952795 remappedIds . set ( parents [ 2 ] , commit . sha ) ;
27962796 parents . splice ( 1 , 2 ) ;
27972797 }
27982798
2799- if ( stashCommit == null && ! avatars . has ( commit . authorEmail ) ) {
2799+ if ( stash == null && ! avatars . has ( commit . authorEmail ) ) {
28002800 avatarUri = getCachedAvatarUri ( commit . authorEmail ) ;
28012801 if ( avatarUri != null ) {
28022802 avatars . set ( commit . authorEmail , avatarUri . toString ( true ) ) ;
@@ -2805,16 +2805,16 @@ export class LocalGitProvider implements GitProvider, Disposable {
28052805
28062806 isCurrentUser = isUserMatch ( currentUser , commit . author , commit . authorEmail ) ;
28072807
2808- if ( stashCommit != null ) {
2808+ if ( stash != null ) {
28092809 contexts . row = serializeWebviewItemContext < GraphItemRefContext > ( {
28102810 webviewItem : 'gitlens:stash' ,
28112811 webviewItemValue : {
28122812 type : 'stash' ,
28132813 ref : createReference ( commit . sha , repoPath , {
28142814 refType : 'stash' ,
2815- name : stashCommit . name ,
2816- message : stashCommit . message ,
2817- number : stashCommit . number ,
2815+ name : stash . name ,
2816+ message : stash . message ,
2817+ number : stash . number ,
28182818 } ) ,
28192819 } ,
28202820 } ) ;
@@ -2852,7 +2852,7 @@ export class LocalGitProvider implements GitProvider, Disposable {
28522852 date : Number ( ordering === 'author-date' ? commit . authorDate : commit . committerDate ) * 1000 ,
28532853 message : emojify ( commit . message . trim ( ) ) ,
28542854 // TODO: review logic for stash, wip, etc
2855- type : stashCommit != null ? 'stash-node' : parents . length > 1 ? 'merge-node' : 'commit-node' ,
2855+ type : stash != null ? 'stash-node' : parents . length > 1 ? 'merge-node' : 'commit-node' ,
28562856 heads : refHeads ,
28572857 remotes : refRemoteHeads ,
28582858 tags : refTags ,
@@ -4996,8 +4996,8 @@ export class LocalGitProvider implements GitProvider, Disposable {
49964996 async getStash ( repoPath : string | undefined ) : Promise < GitStash | undefined > {
49974997 if ( repoPath == null ) return undefined ;
49984998
4999- let stash = this . useCaching ? this . _stashesCache . get ( repoPath ) : undefined ;
5000- if ( stash === undefined ) {
4999+ let gitStash = this . useCaching ? this . _stashesCache . get ( repoPath ) : undefined ;
5000+ if ( gitStash === undefined ) {
50015001 const parser = createLogParserWithFiles < {
50025002 sha : string ;
50035003 date : string ;
@@ -5018,10 +5018,9 @@ export class LocalGitProvider implements GitProvider, Disposable {
50185018 similarityThreshold : configuration . get ( 'advanced.similarityThreshold' ) ,
50195019 } ) ;
50205020
5021- const commits = new Map < string , GitStashCommit > ( ) ;
5021+ const stashes = new Map < string , GitStashCommit > ( ) ;
50225022
5023- const stashes = parser . parse ( data ) ;
5024- for ( const s of stashes ) {
5023+ for ( const s of parser . parse ( data ) ) {
50255024 let onRef ;
50265025 let summary ;
50275026 let message ;
@@ -5042,7 +5041,7 @@ export class LocalGitProvider implements GitProvider, Disposable {
50425041 message = s . summary . trim ( ) ;
50435042 }
50445043
5045- commits . set (
5044+ stashes . set (
50465045 s . sha ,
50475046 new GitCommit (
50485047 this . container ,
@@ -5065,14 +5064,14 @@ export class LocalGitProvider implements GitProvider, Disposable {
50655064 ) ;
50665065 }
50675066
5068- stash = { repoPath : repoPath , commits : commits } ;
5067+ gitStash = { repoPath : repoPath , stashes : stashes } ;
50695068
50705069 if ( this . useCaching ) {
5071- this . _stashesCache . set ( repoPath , stash ?? null ) ;
5070+ this . _stashesCache . set ( repoPath , gitStash ?? null ) ;
50725071 }
50735072 }
50745073
5075- return stash ?? undefined ;
5074+ return gitStash ?? undefined ;
50765075 }
50775076
50785077 @log ( )
@@ -5558,15 +5557,15 @@ export class LocalGitProvider implements GitProvider, Disposable {
55585557
55595558 if ( shas == null ) {
55605559 // TODO@eamodio this is insanity -- there *HAS* to be a better way to get git log to return stashes
5561- const stash = await this . getStash ( repoPath ) ;
5562- if ( stash ?. commits . size ) {
5560+ const gitStash = await this . getStash ( repoPath ) ;
5561+ if ( gitStash ?. stashes . size ) {
55635562 stdin = '' ;
5564- stashes = new Map ( stash . commits ) ;
5565- for ( const commit of stash . commits . values ( ) ) {
5566- stdin += `${ commit . sha . substring ( 0 , 9 ) } \n` ;
5563+ stashes = new Map ( gitStash . stashes ) ;
5564+ for ( const stash of gitStash . stashes . values ( ) ) {
5565+ stdin += `${ stash . sha . substring ( 0 , 9 ) } \n` ;
55675566 // Include the stash's 2nd (index files) and 3rd (untracked files) parents
5568- for ( const p of skip ( commit . parents , 1 ) ) {
5569- stashes . set ( p , commit ) ;
5567+ for ( const p of skip ( stash . parents , 1 ) ) {
5568+ stashes . set ( p , stash ) ;
55705569 stdin += `${ p . substring ( 0 , 9 ) } \n` ;
55715570 }
55725571 }
@@ -5702,15 +5701,15 @@ export class LocalGitProvider implements GitProvider, Disposable {
57025701 let stdin : string | undefined ;
57035702
57045703 // TODO@eamodio this is insanity -- there *HAS* to be a better way to get git log to return stashes
5705- const stash = await this . getStash ( repoPath ) ;
5706- if ( stash ?. commits . size ) {
5704+ const gitStash = await this . getStash ( repoPath ) ;
5705+ if ( gitStash ?. stashes . size ) {
57075706 stdin = '' ;
5708- stashes = new Map ( stash . commits ) ;
5709- for ( const commit of stash . commits . values ( ) ) {
5710- stdin += `${ commit . sha . substring ( 0 , 9 ) } \n` ;
5707+ stashes = new Map ( gitStash . stashes ) ;
5708+ for ( const stash of gitStash . stashes . values ( ) ) {
5709+ stdin += `${ stash . sha . substring ( 0 , 9 ) } \n` ;
57115710 // Include the stash's 2nd (index files) and 3rd (untracked files) parents
5712- for ( const p of skip ( commit . parents , 1 ) ) {
5713- stashes . set ( p , commit ) ;
5711+ for ( const p of skip ( stash . parents , 1 ) ) {
5712+ stashes . set ( p , stash ) ;
57145713 stdin += `${ p . substring ( 0 , 9 ) } \n` ;
57155714 }
57165715 }
0 commit comments