mirror of
https://github.com/frappe/bench.git
synced 2024-11-11 15:51:03 +00:00
Merge pull request #98 from frappe/pdvyas-patch-1
Take care of shallow clones in migrate-to-v5
This commit is contained in:
commit
798d485cc1
@ -39,8 +39,9 @@ def validate_v4(bench='.'):
|
||||
|
||||
def checkout_v5(repo, bench='.'):
|
||||
cwd = os.path.join(bench, 'apps', repo)
|
||||
unshallow = "--unshallow" if os.path.exists(os.path.join(cwd, ".git", "shallow")) else ""
|
||||
if os.path.exists(cwd):
|
||||
exec_cmd("git fetch upstream", cwd=cwd)
|
||||
exec_cmd("git config --add remote.upstream.fetch '+refs/heads/*:refs/remotes/upstream/*'", cwd=cwd)
|
||||
exec_cmd("git fetch upstream {unshallow}".format(unshallow=unshallow), cwd=cwd)
|
||||
exec_cmd("git checkout v5.0", cwd=cwd)
|
||||
exec_cmd("git clean -df", cwd=cwd)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user