Thread (47 messages) flat view 47 messages, 6 authors, 2021-09-24

Re: [PATCH 06/11] t3407: strengthen rebase --abort tests

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2021-09-08 10:44:47

On Wed, Sep 08 2021, Phillip Wood via GitGitGadget wrote:
The existing tests only check that HEAD points to the correct
commit after aborting, they do not check that the original branch
is checked out.
[...]
+# Check that HEAD is equal to "pre-rebase" and the current branch is
+# "to-rebase"
+check_head() {
+	test_cmp_rev HEAD pre-rebase &&
+	test "$(git symbolic-ref HEAD)" = refs/heads/to-rebase
+}
I reflexively thought "use test_cmp here!", but in this case that's
pointless as any difference is noted by test_cmp_rev, we're really
seeing what HEAD is checked out to here. I see we use the same pattern
in various other tests...
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help