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

Limit Rugged Control Repo refspec #1412

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions CHANGELOG.mkd
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Unreleased
- Require Ruby 3.1 [#1402](https://github.com/puppetlabs/r10k/pull/1402)
- Replace deprecated action: actions/setup-ruby->ruby/setup-ruby [#1406](https://github.com/puppetlabs/r10k/pull/1406)
- Ensure git repositories are pruned on fetch [#1410](https://github.com/puppetlabs/r10k/pull/1410)
- Limit Rugged Control Repo refspec to only clone refs/heads [#1412](https://github.com/puppetlabs/r10k/pull/1412)

4.1.0
-----
Expand Down
4 changes: 2 additions & 2 deletions lib/r10k/git/rugged/bare_repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def clone(remote)
@_rugged_repo = ::Rugged::Repository.init_at(@path.to_s, true).tap do |repo|
config = repo.config
config['remote.origin.url'] = remote
config['remote.origin.fetch'] = '+refs/*:refs/*'
config['remote.origin.fetch'] = '+refs/heads/*:refs/heads/*'
config['remote.origin.mirror'] = 'true'
end

Expand All @@ -60,7 +60,7 @@ def fetch(remote_name='origin')
proxy = R10K::Git.get_proxy_for_remote(remote)

options = {:credentials => credentials, :prune => true, :proxy_url => proxy}
refspecs = ['+refs/*:refs/*']
refspecs = ['+refs/heads/*:refs/heads/*']

results = nil

Expand Down
Loading