We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b8f719d commit 9f795daCopy full SHA for 9f795da
lib/git/lib.rb
@@ -430,9 +430,13 @@ def clean(opts = {})
430
end
431
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
+
436
arr_opts = []
- arr_opts << '--no-edit' if opts[:no_edit] || opts[:'no-edit']
437
+ arr_opts << '--no-edit' if opts[:'no-edit']
438
arr_opts << commitish
439
440
command('revert', arr_opts)
441
442
tests/units/test_index_ops.rb
@@ -83,7 +83,7 @@ def test_revert
83
new_file('test-file2', 'blablahbla')
84
g.add
85
g.commit("second-commit")
86
- second_commit = g.gcommit('HEAD')
+ g.gcommit('HEAD')
87
88
commits = g.log(1e4).count
89
g.revert(first_commit.sha)
0 commit comments