gitlab_git 10.2.1 → 10.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/gitlab_git/repository.rb +16 -0
  4. metadata +2 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6c94b6a55ac8082363a377e7a9a7cc8c0d98638d
4
- data.tar.gz: 75535b754be9e04d1d4ed19e718c502241221f03
3
+ metadata.gz: 668689e725fe84e3a117357e3844505f71b0d394
4
+ data.tar.gz: b9685279000d370fbeb8a7ad6e25e23f05977151
5
5
  SHA512:
6
- metadata.gz: 50ffd69f42646ba5f2c9c293127d64590744f965b33b158e543bc36c1673eb2da9af5dea7ae3abb94692afd5bc51fd888db8712191eabb80a162be44c66929ab
7
- data.tar.gz: cd9d15af5c913484f62c0e18fd1a1962a28eff08d918f533427c55a4c954eefd826d7efc5276e150daa44f9c1ba7775aacf860839e885797e7d32e64b1341c5e
6
+ metadata.gz: 1d869356e432d100243f5538a9324c87adb9e7689ba9643e0f4273d7910873ca2beb9f97c3b02508ce725fb67078055805e338fed026724b7b7b2a0c5d47d8ea
7
+ data.tar.gz: b66a6b0eb24ce0c0fcf1fac52fb09d5521cb918a083e2a52deb05b2c65f3c1872818246ac07f6254f061c879ae0560f3dc61ad6d7048b7cdb045cf63856dea27
data/VERSION CHANGED
@@ -1 +1 @@
1
- 10.2.1
1
+ 10.2.2
@@ -809,6 +809,22 @@ module Gitlab
809
809
  rugged.remotes[remote_name].push(refspecs)
810
810
  end
811
811
 
812
+ # Return a String containing the mbox-formatted diff between +from+ and
813
+ # +to+. See #diff for the allowed keys in the +options+ hash.
814
+ def format_patch(from, to, options = {})
815
+ options ||= {}
816
+ break_rewrites = options[:break_rewrites]
817
+ actual_options = Diff.filter_diff_options(options)
818
+
819
+ from_sha = rugged.rev_parse_oid(from)
820
+ to_sha = rugged.rev_parse_oid(to)
821
+ commits_between(from_sha, to_sha).map do |commit|
822
+ # Ignore merge commits, which have more than one parent,
823
+ # in creation of patch to mimic the behavior of `git format-patch`
824
+ commit.to_mbox(actual_options) if commit.parents.length <= 1
825
+ end.flatten.join("\n")
826
+ end
827
+
812
828
  # Merge the +source_name+ branch into the +target_name+ branch. This is
813
829
  # equivalent to `git merge --no_ff +source_name+`, since a merge commit
814
830
  # is always created.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab_git
3
3
  version: !ruby/object:Gem::Version
4
- version: 10.2.1
4
+ version: 10.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitriy Zaporozhets
@@ -130,3 +130,4 @@ signing_key:
130
130
  specification_version: 4
131
131
  summary: Gitlab::Git library
132
132
  test_files: []
133
+ has_rdoc: