Commit ·
c4d6e89
1
Parent(s): 6f246a1
Update get_commits.py
Browse files13 unmodified lines141516171817181920212213 unmodified lines"""
#Shell utilsdef run_in_shell(cmd: str, cwd=None): completed = subprocess.run([cmd], capture_output=True, shell=True, cwd=cwd)def run_in_shell(cmd: str, cwd=None, timeout=120): # Default 2min timeout (mostly for git fetch --depth 2 origin when the repo is private & GH asks for a username) completed = subprocess.run([cmd], capture_output=True, shell=True, cwd=cwd, timeout=timeout) return completed
def get_file_contents(commit, old_file, new_file, repo, cwd=None):get_commits.py+3-2