File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -430,9 +430,13 @@ def clean(opts = {})
430
430
end
431
431
432
432
def revert ( commitish , opts = { } )
433
+ # Forcing --no-edit as default since it's not an interactive session.
434
+ opts = { :'no-edit' => true } . merge ( opts )
435
+
433
436
arr_opts = [ ]
434
- arr_opts << '--no-edit' if opts [ :no_edit ] || opts [ : 'no-edit']
437
+ arr_opts << '--no-edit' if opts [ :'no-edit' ]
435
438
arr_opts << commitish
439
+
436
440
command ( 'revert' , arr_opts )
437
441
end
438
442
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ def test_revert
83
83
new_file ( 'test-file2' , 'blablahbla' )
84
84
g . add
85
85
g . commit ( "second-commit" )
86
- second_commit = g . gcommit ( 'HEAD' )
86
+ g . gcommit ( 'HEAD' )
87
87
88
88
commits = g . log ( 1e4 ) . count
89
89
g . revert ( first_commit . sha )
You can’t perform that action at this time.
0 commit comments