Volume XXII, number 279Tuesday, October 6, 2026Latest message 14 minutes ago

The Git List

News and archive of git@vger.kernel.org, since April 2005

git rebase silently ignores nonexistent -X (--strategy-option) but git merge does not

1 messages between Aug 8, 2026 and Aug 8, 2026, from zrzut01@poczta.fm.

Plain Markdown or JSON for tools and agents.

zrzut01@poczta.fmAug 8, 2026, 18:23 UTC on lore
Hello,

When provide nonexistent <option> to -X when doing rebase it silently ignores it. Same scenario when executing merge results in error. Such situation can lead to false positive for end user who will be confident that whole operation succeeded.

Fedora Linux 44, 7.1.7-200.fc44.x86_64

$ git --version git version 2.55.0

Example scenario:

$ git clone https://github.com/schacon/simplegit-progit.git Cloning into 'simplegit-progit'... remote: Enumerating objects: 13, done. remote: Total 13 (delta 0), reused 0 (delta 0), pack-reused 13 (from 1) Receiving objects: 100% (13/13), done. Resolving deltas: 100% (3/3), done.

$ cd simplegit-progit
$ git branch -c iss1
$ git checkout iss1
$ vi Rakefile
$ git diff
diff --git a/Rakefile b/Rakefile
index 8f94139..8080252 100644
--- a/Rakefile
+++ b/Rakefile
@@ -5,8 +5,8 @@ require 'rake/gempackagetask'
 spec = Gem::Specification.new do |s|
     s.platform  =   Gem::Platform::RUBY
     s.name      =   "simplegit"
-    s.version   =   "0.1.1"
-    s.author    =   "Scott Chacon"
+    s.version   =   "0.1.1"■■■■■
+    s.author    =   "Scott Chacon Big"
     s.email     =   "schacon@gmail.com"
     s.summary   =   "A simple gem for using Git in Ruby code."
     s.files     =   FileList['lib/**/*'].to_a

--------------
// ■ - space character
--------------

$ git commit -am 'iss1: author name change'
[iss1 fa40d71] iss1: author name change
 1 file changed, 2 insertions(+), 2 deletions(-)

$ git checkout master
Switched to branch 'master'

$ vi Rakefile

$ git diff
diff --git a/Rakefile b/Rakefile
index 8f94139..e458853 100644
--- a/Rakefile
+++ b/Rakefile
@@ -5,7 +5,7 @@ require 'rake/gempackagetask'
 spec = Gem::Specification.new do |s|
     s.platform  =   Gem::Platform::RUBY
     s.name      =   "simplegit"
-    s.version   =   "0.1.1"
+    s.version   =   "0.1.2"
     s.author    =   "Scott Chacon"
     s.email     =   "schacon@gmail.com"
     s.summary   =   "A simple gem for using Git in Ruby code."

$ git commit -am 'master: version update'
[master f2b3ef3] master: version update
 1 file changed, 1 insertion(+), 1 deletion(-)

$ git checkout iss1
Switched to branch 'iss1'

$ git rebase master
Auto-merging Rakefile
CONFLICT (content): Merge conflict in Rakefile
error: could not apply fa40d71... iss1: author name change
hint: Resolve all conflicts manually, mark them as resolved with
hint: "git add/rm &lt;conflicted_files>", then run "git
rebase --continue".
hint: You can instead skip this commit: run "git rebase --skip".
hint: To abort and get back to the state before "git rebase", run
"git rebase --abort".
hint: Disable this message with "git config set advice.mergeConflict
false"
Could not apply fa40d71... # iss1: author name change

$ git rebase --abort

$ git rebase -X sillyoption master
Auto-merging Rakefile
CONFLICT (content): Merge conflict in Rakefile
error: could not apply fa40d71... iss1: author name change
hint: Resolve all conflicts manually, mark them as resolved with
hint: "git add/rm &lt;conflicted_files>", then run "git
rebase --continue".
hint: You can instead skip this commit: run "git rebase --skip".
hint: To abort and get back to the state before "git rebase", run
"git rebase --abort".
hint: Disable this message with "git config set advice.mergeConflict
false"
Could not apply fa40d71... # iss1: author name change

Back to recent threads