El lun, 8 jun 2026 a las 18:37, Ben Knoble ([off-list ref]) escribió:
[snip]
quoted
+test_expect_success 'aborts if the commit message is the same' '
+ test_when_finished "rm -rf repo" &&
+ git init repo &&
+ (
+ cd repo &&
+ test_commit first &&
+ test_commit second &&
+
+ git rev-parse HEAD >oid-before &&
+ write_script fake-editor.sh <<-\EOF &&
+ true
+ EOF
+ test_set_editor "$(pwd)"/fake-editor.sh &&
+ git history reword HEAD 2>err &&
+ git rev-parse HEAD >oid-after &&
+ test_cmp oid-before oid-after &&
+ test_grep "Message unchanged" err
+ )
…but I think this test case could do something like "GIT_EDITOR=true git history reword HEAD" and avoid the script?
It does work, thanks.
quoted
+'
+
test_done
--
2.54.0
Best,
Ben
--
Pablo