Thread (36 messages) 36 messages, 8 authors, 5d ago

Re: [PATCH RFC 1/2] builtin/history: abort reword on unchanged message

From: Pablo Sabater <hidden>
Date: 2026-06-09 09:59:36

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help