forked from JOJ/Joint-Teapot
		
	feat: remove more git locks
This commit is contained in:
		
							parent
							
								
									3f8d7af725
								
							
						
					
					
						commit
						3550042c8e
					
				|  | @ -85,10 +85,12 @@ class Git: | ||||||
|         retry_interval = 2 |         retry_interval = 2 | ||||||
|         while retry_interval and auto_retry: |         while retry_interval and auto_retry: | ||||||
|             try: |             try: | ||||||
|                 if clean_git_lock and os.path.exists( |                 if clean_git_lock: | ||||||
|                     os.path.join(repo_dir, ".git/index.lock") |                     lock_files = ["index.lock", "HEAD.lock", "fetch-pack.lock"] | ||||||
|                 ): |                     for lock_file in lock_files: | ||||||
|                     os.remove(os.path.join(repo_dir, ".git/index.lock")) |                         lock_path = os.path.join(repo_dir, ".git", lock_file) | ||||||
|  |                         if os.path.exists(lock_path): | ||||||
|  |                             os.remove(lock_path) | ||||||
|                 repo.git.fetch("--tags", "--all", "-f") |                 repo.git.fetch("--tags", "--all", "-f") | ||||||
|                 repo.git.reset("--hard", "origin/master") |                 repo.git.reset("--hard", "origin/master") | ||||||
|                 repo.git.clean("-d", "-f", "-x") |                 repo.git.clean("-d", "-f", "-x") | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user