Skip to content

Commit

Permalink
Merge pull request #1412 from seanmil/target_refspec
Browse files Browse the repository at this point in the history
Limit Rugged Control Repo refspec
  • Loading branch information
justinstoller authored Dec 4, 2024
2 parents a316bd4 + c582010 commit fe2b37f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.mkd
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,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

0 comments on commit fe2b37f

Please sign in to comment.