* git rebase silently ignores nonexistent -X (--strategy-option) but git merge does not
@ 2026-08-08 18:23 zrzut01
0 siblings, 0 replies; only message in thread
From: zrzut01 @ 2026-08-08 18:23 UTC (permalink / raw)
To: git
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 <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 <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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-08 18:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-08 18:23 git rebase silently ignores nonexistent -X (--strategy-option) but git merge does not zrzut01
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox