File tree 3 files changed +5
-4
lines changed 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -783,8 +783,7 @@ def run_command(git_cmd, &block)
783
783
end
784
784
785
785
def escape ( s )
786
- escaped = s . to_s . gsub ( '\'' , '\'\\\'\'' )
787
- %Q{"#{ escaped } "}
786
+ "'#{ s && s . to_s . gsub ( "'" , "\\ '" ) } '"
788
787
end
789
788
790
789
end
Original file line number Diff line number Diff line change @@ -61,7 +61,9 @@ def test_branch_create_and_switch
61
61
62
62
new_file ( 'test-file1' , 'blahblahblah1' )
63
63
new_file ( 'test-file2' , 'blahblahblah2' )
64
+ new_file ( '.test-dot-file1' , 'blahblahblahdot1' )
64
65
assert ( g . status . untracked . assoc ( 'test-file1' ) )
66
+ assert ( g . status . untracked . assoc ( '.test-dot-file1' ) )
65
67
66
68
g . add ( [ 'test-file1' , 'test-file2' ] )
67
69
assert ( !g . status . untracked . assoc ( 'test-file1' ) )
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ def test_logger
19
19
@git . branches . size
20
20
21
21
logc = File . read ( log . path )
22
- assert ( /INFO -- : git branch "-a" / . match ( logc ) )
22
+ assert ( /INFO -- : git branch '-a' / . match ( logc ) )
23
23
assert ( /DEBUG -- : \* git_grep/ . match ( logc ) )
24
24
25
25
log = Tempfile . new ( 'logfile' )
@@ -31,7 +31,7 @@ def test_logger
31
31
@git . branches . size
32
32
33
33
logc = File . read ( log . path )
34
- assert ( /INFO -- : git branch "-a" / . match ( logc ) )
34
+ assert ( /INFO -- : git branch '-a' / . match ( logc ) )
35
35
assert ( !/DEBUG -- : \* git_grep/ . match ( logc ) )
36
36
end
37
37
You can’t perform that action at this time.
0 commit comments