git 1.6.0 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of git might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +1 -1
- data/lib/git/lib.rb +23 -9
- data/lib/git/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b2d97fee392eb89bbfc8963b8207db3ef1c57149788aa7dfae63a420811121d6
|
4
|
+
data.tar.gz: f116ee398b4631b6625ed37ab3af78086fd7368bcf506554e2a8451e561f97d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f9c01312658ea5daf34cb76202b27f7d707e88837415170c0183ed80a066d1996b4c5c52be327ded868cd169241c0b5aa488857c4f62bb1291df0094a2817f9
|
7
|
+
data.tar.gz: 5b8fb64f63da828453d6adcc02e35b8450d4ba1431a7bd55002eb10acbbe28e9e0df6ffeec73e7bf09c6714c589a01b900a5a7a3242ed4cad7a754ad26d456c9
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -18,7 +18,7 @@ You can install Ruby/Git like this:
|
|
18
18
|
|
19
19
|
* [![Build Status](https://travis-ci.org/ruby-git/ruby-git.svg?branch=master)](https://travis-ci.org/ruby-git/ruby-git)
|
20
20
|
* [![Code Climate](https://codeclimate.com/github/ruby-git/ruby-git.png)](https://codeclimate.com/github/ruby-git/ruby-git)
|
21
|
-
* [![Gem Version](https://badge.fury.io/rb/git.
|
21
|
+
* [![Gem Version](https://badge.fury.io/rb/git.svg)](https://badge.fury.io/rb/git)
|
22
22
|
|
23
23
|
## Major Objects
|
24
24
|
|
data/lib/git/lib.rb
CHANGED
@@ -114,12 +114,12 @@ module Git
|
|
114
114
|
arr_opts << '--always' if opts[:always]
|
115
115
|
arr_opts << '--exact-match' if opts[:exact_match] || opts[:"exact-match"]
|
116
116
|
|
117
|
-
arr_opts << '--dirty' if opts[
|
118
|
-
arr_opts << "--dirty=#{opts[
|
117
|
+
arr_opts << '--dirty' if opts[:dirty] == true
|
118
|
+
arr_opts << "--dirty=#{opts[:dirty]}" if opts[:dirty].is_a?(String)
|
119
119
|
|
120
|
-
arr_opts << "--abbrev=#{opts[
|
121
|
-
arr_opts << "--candidates=#{opts[
|
122
|
-
arr_opts << "--match=#{opts[
|
120
|
+
arr_opts << "--abbrev=#{opts[:abbrev]}" if opts[:abbrev]
|
121
|
+
arr_opts << "--candidates=#{opts[:candidates]}" if opts[:candidates]
|
122
|
+
arr_opts << "--match=#{opts[:match]}" if opts[:match]
|
123
123
|
|
124
124
|
arr_opts << committish if committish
|
125
125
|
|
@@ -550,6 +550,18 @@ module Git
|
|
550
550
|
command('rm', arr_opts)
|
551
551
|
end
|
552
552
|
|
553
|
+
# Takes the commit message with the options and executes the commit command
|
554
|
+
#
|
555
|
+
# accepts options:
|
556
|
+
# :amend
|
557
|
+
# :all
|
558
|
+
# :allow_empty
|
559
|
+
# :author
|
560
|
+
# :date
|
561
|
+
# :no_verify
|
562
|
+
#
|
563
|
+
# @param [String] message the commit message to be used
|
564
|
+
# @param [Array] opts the commit options to be used
|
553
565
|
def commit(message, opts = {})
|
554
566
|
arr_opts = []
|
555
567
|
arr_opts << "--message=#{message}" if message
|
@@ -558,6 +570,7 @@ module Git
|
|
558
570
|
arr_opts << '--allow-empty' if opts[:allow_empty]
|
559
571
|
arr_opts << "--author=#{opts[:author]}" if opts[:author]
|
560
572
|
arr_opts << "--date=#{opts[:date]}" if opts[:date].is_a? String
|
573
|
+
arr_opts << '--no-verify' if opts[:no_verify]
|
561
574
|
|
562
575
|
command('commit', arr_opts)
|
563
576
|
end
|
@@ -616,7 +629,7 @@ module Git
|
|
616
629
|
end
|
617
630
|
|
618
631
|
def stash_save(message)
|
619
|
-
output = command('stash save', [
|
632
|
+
output = command('stash save', [message])
|
620
633
|
output =~ /HEAD is now at/
|
621
634
|
end
|
622
635
|
|
@@ -945,6 +958,7 @@ module Git
|
|
945
958
|
global_opts = []
|
946
959
|
global_opts << "--git-dir=#{@git_dir}" if !@git_dir.nil?
|
947
960
|
global_opts << "--work-tree=#{@git_work_dir}" if !@git_work_dir.nil?
|
961
|
+
global_opts << ["-c", "color.ui=false"]
|
948
962
|
|
949
963
|
opts = [opts].flatten.map {|s| escape(s) }.join(' ')
|
950
964
|
|
@@ -1049,11 +1063,11 @@ module Git
|
|
1049
1063
|
end
|
1050
1064
|
|
1051
1065
|
def normalize_encoding(str)
|
1052
|
-
return str if str.valid_encoding? && str.encoding == default_encoding
|
1066
|
+
return str if str.valid_encoding? && str.encoding.name == default_encoding
|
1053
1067
|
|
1054
|
-
return str.encode(default_encoding, str.encoding, encoding_options) if str.valid_encoding?
|
1068
|
+
return str.encode(default_encoding, str.encoding, **encoding_options) if str.valid_encoding?
|
1055
1069
|
|
1056
|
-
str.encode(default_encoding, detected_encoding(str), encoding_options)
|
1070
|
+
str.encode(default_encoding, detected_encoding(str), **encoding_options)
|
1057
1071
|
end
|
1058
1072
|
|
1059
1073
|
def run_command(git_cmd, &block)
|
data/lib/git/version.rb
CHANGED
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: 1.
|
4
|
+
version: 1.7.0
|
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: 2020-
|
11
|
+
date: 2020-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rchardet
|
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
125
125
|
version: '0'
|
126
126
|
requirements:
|
127
127
|
- git 1.6.0.0, or greater
|
128
|
-
rubygems_version: 3.
|
128
|
+
rubygems_version: 3.1.2
|
129
129
|
signing_key:
|
130
130
|
specification_version: 4
|
131
131
|
summary: Ruby/Git is a Ruby library that can be used to create, read and manipulate
|