Thread (2 messages) 2 messages, 2 authors, 2022-09-22

Re: [PATCH v2] sequencer: avoid dropping fixup commit that targets self via commit-ish

From: Johannes Altmanninger <hidden>
Date: 2022-09-22 04:00:38

On Wed, Sep 21, 2022 at 11:47:26AM -0700, Junio C Hamano wrote:
quoted hunk ↗ jump to hunk
Johannes Altmanninger [off-list ref] writes:
quoted
+test_expect_success 'auto squash that matches regex' '
+	git reset --hard base &&
+	git commit --allow-empty -m "hay needle hay" &&
+	git commit --allow-empty -m "fixup! :/needle" &&
+	GIT_SEQUENCE_EDITOR="cat >tmp" git rebase --autosquash -i HEAD^^ &&
+	sed -ne "/^[^#]/{s/[0-9a-f]\{7,\}/HASH/g;p;}" tmp >actual &&
+	cat <<-EOF >expect &&
+	pick HASH hay needle hay # empty
+	fixup HASH fixup! :/needle # empty
+	EOF
+	test_cmp expect actual
+'
hint: Waiting for your editor to close the file...
Successfully rebased and updated refs/heads/main.
--- expect      2022-09-21 18:45:27.617530848 +0000
+++ actual      2022-09-21 18:45:27.613530478 +0000
@@ -1,2 +1,2 @@
 pick HASH hay needle hay # empty
-fixup HASH fixup! :/needle # empty
+pick HASH fixup! :/needle # empty
not ok 11 - auto squash that matches regex

That does not look very good X-<.
Sorry the v2 of this test case is very misleading, should probably drop this
test entirely.  It's been a long a day so I'll send v3 another day (if needed).
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help