Skip to content

Commit

Permalink
clone/fetch without tags
Browse files Browse the repository at this point in the history
  • Loading branch information
jonpas committed Jun 2, 2023
1 parent baae7bc commit eca8f19
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions git_template_repo/git_template_repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def execute(args):
os.chdir(clone_dir)
make_call("git", "init")
else:
make_call("git", "clone", new_repo, clone_dir)
make_call("git", "clone", "--no-tags", new_repo, clone_dir)
os.chdir(clone_dir)

if int(make_call("git", "rev-list", "--all", "--count")):
Expand All @@ -93,10 +93,10 @@ def execute(args):
make_call("git", "remote", "add", "template", template_repo)

if is_sha1(template_branch):
make_call("git", "fetch", "template", template_branch)
make_call("git", "fetch", "--no-tags", "template", template_branch)
make_call("git", "checkout", "--orphan", new_root_branch, template_branch)
else:
make_call("git", "fetch", "template")
make_call("git", "fetch", "--no-tags", "template")
make_call("git", "checkout", "--orphan", new_root_branch, f"template/{template_branch}")

make_call("git", "add", "-A")
Expand Down

0 comments on commit eca8f19

Please sign in to comment.