git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Zzrzut01@poczta.fm <zrzut01@poczta.fm>
Date
Aug 8, 2026, 18:23 UTC
Message-ID
<ytaphxxbfvopjtsyyukv@gflc>
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
Message 1 of 1 in “git rebase silently ignores nonexistent -X (--strategy-option) but git merge does not”
  1. zrzut01@poczta.fmAug 8, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.