Skip to content

Commit 7a4031f

Browse files
committed
Replace git pull by generation of a new clone
1 parent 83f9066 commit 7a4031f

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

github2pandas/version.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -131,16 +131,17 @@ def clone_repository(repo, data_root_dir, github_token=None, new_clone=False):
131131
version_folder.mkdir(parents=True, exist_ok=True)
132132

133133
repo_dir = version_folder.joinpath(Version.VERSION_REPOSITORY_DIR)
134-
if (repo_dir.exists ()) & (not new_clone):
135-
old_path = Path.cwd()
136-
os.chdir(repo_dir)
137-
try:
138-
git2output = subprocess.check_output(["git", "pull"])
139-
except:
140-
print("This repository is empty, git pull generates an error")
141-
print('git said:', git2output)
142-
os.chdir(old_path)
143-
return
134+
# Issue #62
135+
#if (repo_dir.exists ()) & (not new_clone):
136+
# old_path = Path.cwd()
137+
# os.chdir(repo_dir)
138+
# try:
139+
# git2output = subprocess.check_output(["git", "pull"])
140+
# except:
141+
# print("This repository is empty, git pull generates an error")
142+
# print('git said:', git2output)
143+
# os.chdir(old_path)
144+
# return
144145

145146
if repo_dir.exists ():
146147
shutil.rmtree(repo_dir.resolve(), onerror=Version.handleError)

0 commit comments

Comments
 (0)