Skip to content

Commit 2b9629d

Browse files
authored
Remove extraneous '--' from git stash save -- message
* Fix warning under ruby 2.7 Signed-off-by: Antonio Terceiro <asa@terceiro.xyz> * Git::Lib: fix stash_save for git 2.25+ On git 2.20, that '--' gets ignored, but on newer versions, at least from git 2.25+, it gets into the stash message. Signed-off-by: Antonio Terceiro <asa@terceiro.xyz> * test_helper: drop unecessary relative reference to lib/ Rakefile loads git.gemspec which already adds lib/ to the $LOAD_PATH. This also makes it possible to run the tests against the library installed system-wide. Signed-off-by: Antonio Terceiro <asa@terceiro.xyz>
1 parent af4902b commit 2b9629d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/git/lib.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ def stashes_all
616616
end
617617

618618
def stash_save(message)
619-
output = command('stash save', ['--', message])
619+
output = command('stash save', [message])
620620
output =~ /HEAD is now at/
621621
end
622622

tests/test_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require 'logger'
44
require 'test/unit'
55

6-
require "#{File.expand_path(File.dirname(__FILE__))}/../lib/git"
6+
require "git"
77

88
class Test::Unit::TestCase
99

0 commit comments

Comments
 (0)