Re: [PATCH v6 3/6] set-head: better output for --auto
- From
Bence Ferdinandy <bence@ferdinandy.com>
- Date
- Oct 11, 2024, 09:03 UTC
- Message-ID
- <D4SUTJDV0Y04.3Q8YED2MVOKBL@ferdinandy.com>
- In-Reply-To
- <CAOLa=ZSV50OkDC2p5AHHW0u+fAtLMcCX36W1SuT8AnTkX7HNZg@mail.gmail.com>
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 <karthik.188@gmail.com> wrote: [snip]
Show 14 quoted lines
> > 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.
Show 5 quoted lines
>
> > + 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 belowYou 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