git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: "git symbolic-ref" doesn't do a very good job

From
Jeff King <peff@peff.net>
Date
Aug 2, 2022, 00:46 UTC
Message-ID
<Yuhz0VAX77qv4P5Z@coredump.intra.peff.net>
In-Reply-To
<xmqqfsifyetv.fsf@gitster.g>
On Mon, Aug 01, 2022 at 11:54:36AM -0700, Junio C Hamano wrote:
Show 8 quoted lines
> > +test_expect_success 'symbolic-ref allows top-level target for non-HEAD' '
> > +	git symbolic-ref refs/heads/top-level FETCH_HEAD &&
> > +	git update-ref FETCH_HEAD HEAD &&
> > +	test_cmp_rev top-level HEAD
> > +'
> >  test_done
> 
> Strange, but OK.

I'd be OK to drop this if you hate it too much, btw. Mostly I wanted to make sure that the various iterations behaved as I expected. But there is a test in t3200 (the one Linus found earlier) that incidentally does check that something like this works.

-Peff
Previous: Junio C HamanoNext: Junio C Hamano
Message 11 of 17 in “"git symbolic-ref" doesn't do a very good job”
  1. Linus TorvaldsJul 30, 2022
  2. Linus TorvaldsJul 30, 2022
  3. Junio C HamanoJul 30, 2022
  4. Jeff KingJul 31, 2022
  5. Jeff KingJul 31, 2022
  6. Linus TorvaldsJul 31, 2022
  7. Jeff KingAug 1, 2022
  8. Jeff KingAug 1, 2022
  9. Jeff KingAug 1, 2022
  10. Junio C HamanoAug 1, 2022
  11. Jeff KingAug 2, 2022
  12. Junio C HamanoAug 2, 2022
  13. Linus TorvaldsAug 1, 2022
  14. Junio C HamanoJul 31, 2022
  15. Jeff KingAug 1, 2022
  16. Linus TorvaldsAug 1, 2022
  17. Jeff KingAug 1, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.