Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore github pull request refs when cloning or fetching #777

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions ccmlib/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,15 +164,19 @@ def clone_development(git_repo, version, verbose=False, alias=False):
if not os.path.exists(local_git_cache):
common.info("Cloning Cassandra...")
process = subprocess.Popen(
['git', 'clone', '--mirror', git_repo, local_git_cache],
['git', 'clone', '--mirror',
'-c remote.origin.fetch=+refs/heads/*:refs/heads/*',
'-c remote.origin.fetch=+refs/tags/*:refs/tags/*',
git_repo, local_git_cache],
cwd=__get_dir(), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, _, _ = log_info(process, logger)
assert out == 0, "Could not do a git clone"
else:
common.info("Fetching Cassandra updates...")
process = subprocess.Popen(
['git', 'fetch', '-fup', 'origin', '+refs/*:refs/*'],
cwd=local_git_cache, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
['git', 'fetch', '-fup', 'origin',
'+refs/heads/*:refs/heads/*', '+refs/tags/*:refs/tags/*'],
cwd=local_git_cache, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, _, _ = log_info(process, logger)
assert out == 0, "Could not update git"

Expand Down