git 2.0.0.pre2 → 2.0.0.pre3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 23b5fa33a9a0cb112334c8b243abd6b388984d5f63aa2ee57f83e67d66e68f4b
4
- data.tar.gz: 292e0d1c9aa4ce4671206abcdb1a547ab606090ecd7b8f2d182def4721347c03
3
+ metadata.gz: 0bd064fe363a807e4c9a77eaf61810f6fc41323ad1b60a57eb0379460f26e91c
4
+ data.tar.gz: 890bb2663ba5e3cc9b12f3dae403a019e3b7eb0ffb95ad2fdf5989073d53e807
5
5
  SHA512:
6
- metadata.gz: 2332e16fc52d5ff5fd67cea38a1e4196bb98c06256746e81d13b0572ac78957743559eb27b8de752ba8c960e72f912cb5077fce625b6233ed6e63e1c2ef67890
7
- data.tar.gz: bf769b8943941cec7efa01bae6152302023045d01a69c6aaddf9c04f8815eb18828a2e81b8133d0c7ab873235f08acfecce528d3e7f8659fb032baa73e44c6a1
6
+ metadata.gz: bbd732fb4061c1b68500860218eb14248adc48d4e4ff77d9b2c19cd13de5cb54c9c1bf313949131c91c7e3a25b24d8d105abb485571e06b25415875a67ce4f94
7
+ data.tar.gz: 6bf02024406485e4150cc76073d859446e490a659e6a17dad1f0f04c9d0084bcb063ccbc12dc839baa1b20094e2a2dcaf800c744560c49eab29264b588d154fb
data/CHANGELOG.md CHANGED
@@ -5,6 +5,14 @@
5
5
 
6
6
  # Change Log
7
7
 
8
+ ## v2.0.0.pre3 (2024-03-15)
9
+
10
+ [Full Changelog](https://github.com/ruby-git/ruby-git/compare/v2.0.0.pre2..v2.0.0.pre3)
11
+
12
+ Changes since v2.0.0.pre2:
13
+
14
+ * 5d4b34e Allow allow_unrelated_histories option for Base#pull
15
+
8
16
  ## v2.0.0.pre2 (2024-02-24)
9
17
 
10
18
  [Full Changelog](https://github.com/ruby-git/ruby-git/compare/v2.0.0.pre1..v2.0.0.pre2)
data/lib/git/base.rb CHANGED
@@ -409,14 +409,27 @@ module Git
409
409
  self.lib.conflicts(&block)
410
410
  end
411
411
 
412
- # pulls the given branch from the given remote into the current branch
413
- #
414
- # @git.pull # pulls from origin/master
415
- # @git.pull('upstream') # pulls from upstream/master
416
- # @git.pull('upstream', 'develope') # pulls from upstream/develop
417
- #
418
- def pull(remote = nil, branch = nil)
419
- self.lib.pull(remote, branch)
412
+ # Pulls the given branch from the given remote into the current branch
413
+ #
414
+ # @param remote [String] the remote repository to pull from
415
+ # @param branch [String] the branch to pull from
416
+ # @param opts [Hash] options to pass to the pull command
417
+ #
418
+ # @option opts [Boolean] :allow_unrelated_histories (false) Merges histories of two projects that started their
419
+ # lives independently
420
+ # @example pulls from origin/master
421
+ # @git.pull
422
+ # @example pulls from upstream/master
423
+ # @git.pull('upstream')
424
+ # @example pulls from upstream/develop
425
+ # @git.pull('upstream', 'develop')
426
+ #
427
+ # @return [Void]
428
+ #
429
+ # @raise [Git::FailedError] if the pull fails
430
+ # @raise [ArgumentError] if a branch is given without a remote
431
+ def pull(remote = nil, branch = nil, opts = {})
432
+ self.lib.pull(remote, branch, opts)
420
433
  end
421
434
 
422
435
  # returns an array of Git:Remote objects
data/lib/git/lib.rb CHANGED
@@ -1006,10 +1006,11 @@ module Git
1006
1006
  end
1007
1007
  end
1008
1008
 
1009
- def pull(remote = nil, branch = nil)
1009
+ def pull(remote = nil, branch = nil, opts = {})
1010
1010
  raise ArgumentError, "You must specify a remote if a branch is specified" if remote.nil? && !branch.nil?
1011
1011
 
1012
1012
  arr_opts = []
1013
+ arr_opts << '--allow-unrelated-histories' if opts[:allow_unrelated_histories]
1013
1014
  arr_opts << remote if remote
1014
1015
  arr_opts << branch if branch
1015
1016
  command('pull', *arr_opts)
data/lib/git/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Git
2
2
  # The current gem version
3
3
  # @return [String] the current gem version.
4
- VERSION='2.0.0.pre2'
4
+ VERSION='2.0.0.pre3'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.pre2
4
+ version: 2.0.0.pre3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Chacon and others
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-24 00:00:00.000000000 Z
11
+ date: 2024-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -222,8 +222,8 @@ licenses:
222
222
  metadata:
223
223
  homepage_uri: http://github.com/ruby-git/ruby-git
224
224
  source_code_uri: http://github.com/ruby-git/ruby-git
225
- changelog_uri: https://rubydoc.info/gems/git/2.0.0.pre2/file/CHANGELOG.md
226
- documentation_uri: https://rubydoc.info/gems/git/2.0.0.pre2
225
+ changelog_uri: https://rubydoc.info/gems/git/2.0.0.pre3/file/CHANGELOG.md
226
+ documentation_uri: https://rubydoc.info/gems/git/2.0.0.pre3
227
227
  post_install_message:
228
228
  rdoc_options: []
229
229
  require_paths: