mirror of
				https://github.com/folke/lazy.nvim.git
				synced 2025-10-31 06:21:14 +00:00 
			
		
		
		
	fix(git): better errors when a branch/tag/version could not be found. Fixes #276
This commit is contained in:
		
					parent
					
						
							
								85173dcc4d
							
						
					
				
			
			
				commit
				
					
						277a2ab10b
					
				
			
		
					 1 changed files with 6 additions and 0 deletions
				
			
		|  | @ -34,6 +34,12 @@ M.log = { | |||
|     elseif opts.check then | ||||
|       local info = assert(Git.info(self.plugin.dir)) | ||||
|       local target = assert(Git.get_target(self.plugin)) | ||||
|       if not target.commit then | ||||
|         for k, v in pairs(target) do | ||||
|           error(k .. " '" .. v .. "' not found") | ||||
|         end | ||||
|         error("no target commit found") | ||||
|       end | ||||
|       assert(target.commit, self.plugin.name .. " " .. target.branch) | ||||
|       if target.commit ~= info.commit then | ||||
|         self.plugin._.updates = { from = info, to = target } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue