Thread (126 messages) 126 messages, 9 authors, 2024-12-05

Re: [PATCH v6 3/6] set-head: better output for --auto

From: Bence Ferdinandy <hidden>
Date: 2024-10-11 09:04:09

Possibly related (same subject, not in this thread)

Thanks for the very helpful review on the series! Most of it is clear to me and
I agree with, so for brevity I'll only comment where I have a question/comment.

On Thu Oct 10, 2024 at 23:05, karthik nayak [off-list ref] wrote:
[snip]
quoted
diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh
index 532035933f..77c12b8709 100755
--- a/t/t5505-remote.sh
+++ b/t/t5505-remote.sh
@@ -429,12 +429,51 @@ test_expect_success 'set-head --auto' '
 	)
 '

+test_expect_success 'set-head --auto detects creation' '
+	(
+		cd test &&
+		rm .git/refs/remotes/origin/HEAD &&
does this work with reftables too?
You got me there, probably not. I'm guessing I should use git update-ref or
something similar to set these values manually instead of editing the file.

On the other hand, is there a way to force the tests to run on a reftables
backend? t/README does not mention anything about this and since in a previous
round it already came up that I forgot to update the reftables backend, it
would be nice if I could actually test everything with that as well.
quoted
+		git remote set-head --auto origin >output &&
+		echo "'\''origin/HEAD'\'' is now created and points to '\''main'\''" >expect &&
Nit: might be cleaner to use `${SQ}` here and below
You mean something like this?

	git remote set-head --auto origin >output &&
	HEAD="'\''origin/HEAD'\''" &&
	echo "${HEAD} is now created and points to '\''main'\''" >expect &&

I tried a few variations and this is what I could get working, but I may be
simply missing something with the backtick.

Thanks,
Bence

-- 
bence.ferdinandy.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help