mirror of
				https://github.com/cmderdev/cmder.git
				synced 2025-11-04 19:32:13 +08:00 
			
		
		
		
	Added closing process in get_git_status (#1)
After execution command: git add * git continues to operate without closing. The process does not stop.
This commit is contained in:
		
							
								
								
									
										5
									
								
								vendor/clink.lua
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								vendor/clink.lua
									
									
									
									
										vendored
									
									
								
							@@ -203,9 +203,12 @@ end
 | 
				
			|||||||
 -- @return {bool}
 | 
					 -- @return {bool}
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
function get_git_status()
 | 
					function get_git_status()
 | 
				
			||||||
    for line in io.popen("git status --porcelain 2>nul"):lines() do
 | 
					    local file = io.popen("git status --no-lock-index --porcelain 2>nul")
 | 
				
			||||||
 | 
					    for line in file:lines() do
 | 
				
			||||||
 | 
					        file:close()
 | 
				
			||||||
        return false
 | 
					        return false
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
 | 
					    file:close()
 | 
				
			||||||
    return true
 | 
					    return true
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user