Skip to content

Commit 55a4903

Browse files
robertodecurnexRoberto Decurnex
authored and
Roberto Decurnex
committed
Keeping the old escape format for windows users
closes ruby-git#156
1 parent 2f8bf94 commit 55a4903

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

History.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
== 1.2.8
2+
3+
* Keeping the old escape format for windows users
4+
* revparse: Supporting ref names containing SHA like substrings (40-hex strings)
5+
* Fix warnings on Ruby 2.1.2
6+
17
== 1.2.7
28

39
* Fixing mesages encoding

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.2.6
1+
1.2.8

lib/git/lib.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,11 @@ def run_command(git_cmd, &block)
829829
end
830830

831831
def escape(s)
832-
"'#{s && s.to_s.gsub('\'','\'"\'"\'')}'"
832+
return "'#{s && s.to_s.gsub('\'','\'"\'"\'')}'" if RUBY_PLATFORM !~ /mingw|mswin/
833+
834+
# Keeping the old escape format for windows users
835+
escaped = s.to_s.gsub('\'', '\'\\\'\'')
836+
return %Q{"#{escaped}"}
833837
end
834838

835839
end

lib/git/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ module Git
22

33
# The current gem version
44
# @return [String] the current gem version.
5-
VERSION='1.2.7'
5+
VERSION='1.2.8'
66

77
end

0 commit comments

Comments
 (0)