Fix #362 - Do not show future changes in PlugDiff
This commit is contained in:
		
							parent
							
								
									52d7da3925
								
							
						
					
					
						commit
						e929534199
					
				
							
								
								
									
										2
									
								
								plug.vim
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								plug.vim
									
									
									
									
									
								
							|  | @ -1998,7 +1998,7 @@ function! s:diff() | ||||||
|       continue |       continue | ||||||
|     endif |     endif | ||||||
| 
 | 
 | ||||||
|     let diff = s:system_chomp('git log --pretty=format:"%h %s (%cr)" "HEAD...HEAD@{1}"', v.dir) |     let diff = s:system_chomp('git log --left-only --pretty=format:"%h %s (%cr)" "HEAD...HEAD@{1}"', v.dir) | ||||||
|     if !empty(diff) |     if !empty(diff) | ||||||
|       call append(1, '') |       call append(1, '') | ||||||
|       call append(2, '- '.k.':') |       call append(2, '- '.k.':') | ||||||
|  |  | ||||||
|  | @ -352,6 +352,24 @@ Execute (Reuse Plug window in another tab): | ||||||
|   q |   q | ||||||
|   unlet tabnr |   unlet tabnr | ||||||
| 
 | 
 | ||||||
|  | Execute (contd. PlugDiff should not show inverted history): | ||||||
|  |   " Additional PlugUpdate to clear diff | ||||||
|  |   PlugUpdate | ||||||
|  |   PlugDiff | ||||||
|  |   Log getline(1, '$') | ||||||
|  | 
 | ||||||
|  |   " Checking out older revisions | ||||||
|  |   for repo in values(g:plugs) | ||||||
|  |     call system(printf('cd %s && git reset HEAD^ --hard', shellescape(repo.dir))) | ||||||
|  |   endfor | ||||||
|  |   unlet repo | ||||||
|  | 
 | ||||||
|  |   " PlugDiff should not report the changes i.e. git log --left-only | ||||||
|  |   PlugDiff | ||||||
|  |   Log getline(1, '$') | ||||||
|  |   AssertEqual 'No updates.', getline(1) | ||||||
|  |   q | ||||||
|  | 
 | ||||||
| ********************************************************************** | ********************************************************************** | ||||||
| ~ On-demand loading / Partial installation/update ~ | ~ On-demand loading / Partial installation/update ~ | ||||||
| ********************************************************************** | ********************************************************************** | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user