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

Re: [PATCH v3 0/3] Remove special casing for PSEUDOREF updates

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 5, 2020, 01:45 UTC
Message-ID
<xmqq1rklrhle.fsf@gitster.c.googlers.com>
In-Reply-To
<xmqqh7tjv6hb.fsf@gitster.c.googlers.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 8 quoted lines
>> Which other refs that aren't really refs should also be supported? The
>> JGit source code suggests that MERGE_HEAD should also be special
>> cased?
>
> I'd think all .git/${SOMETHING}_HEAD are of transitory nature that
> can be left as simple on-disk files that are read (and preferrably
> written---except for FETCH_HEAD for obvious reasons) as if they are
> loose refs handled by files backend.

Sorry for flipping and flopping. The above goes directly against the spirit of 09743417 (Modify pseudo refs through ref backend storage, 2020-07-27). I still think .git/${SOMETHING}_HEAD except for FETCH_HEAD should be written and read via the ref subsystem, but I was wrong to say that it should always be done via the files backend. There is no reason to insist on the use of files backend here.

Show 5 quoted lines
> It probably makes sense not to
> even write reflog entries for them---it is not like the MERGE_HEAD
> I see now in .git/ directory is an updated version of MERGE_HEAD I
> had there yesterday. "git log -g MERGE_HEAD" gives no interesting
> information.

This still is true, but that is pretty much orthogonal to which backend is used.

Show 11 quoted lines
> If the octopus merge does not finish correctly (e.g. due to
> conflicts), with "git reset --hard", we can recover to the original
> state and re-attempt the opeation with "git merge FETCH_HEAD".  Such
> a merge using FETCH_HEAD will produce an octopus merge.
>
> Which means that at least "git merge", FETCH_HEAD is not just a
> regular ref where you can ask what object it points at and it gives
> you a single object name back.
>
> But to other commands like "git log master..FETCH_HEAD", it acts as
> if there is only one object recorded.

All of which means FETCH_HEAD is special and we may not want to burden the special casing of it to newer backends.

Previous: Junio C HamanoNext: Han-Wen Nienhuys
Message 27 of 39 in “Remove special casing for PSEUDOREF updates”
  1. 0/2 Remove special casing for PSEUDOREF updatesHan-Wen Nienhuys via GitGitGadget, Jul 6, 2020
  2. 1/2 Modify pseudo refs through ref backend storageHan-Wen Nienhuys via GitGitGadget, Jul 6, 2020
  3. Junio C HamanoJul 6, 2020
  4. Han-Wen NienhuysJul 7, 2020
  5. Junio C HamanoJul 7, 2020
  6. Han-Wen NienhuysJul 7, 2020
  7. Junio C HamanoJul 7, 2020
  8. 2/2 Make HEAD a PSEUDOREF rather than PER_WORKTREE.Han-Wen Nienhuys via GitGitGadget, Jul 6, 2020
  9. Junio C HamanoJul 6, 2020
  10. Han-Wen NienhuysJul 7, 2020
  11. 0/3 Remove special casing for PSEUDOREF updatesHan-Wen Nienhuys via GitGitGadget, Jul 9, 2020
  12. 2/3 Modify pseudo refs through ref backend storageHan-Wen Nienhuys via GitGitGadget, Jul 9, 2020
  13. 3/3 Make HEAD a PSEUDOREF rather than PER_WORKTREE.Han-Wen Nienhuys via GitGitGadget, Jul 9, 2020
  14. 1/3 t1400: use git rev-parse for testing PSEUDOREF existenceHan-Wen Nienhuys via GitGitGadget, Jul 9, 2020
  15. Junio C HamanoJul 10, 2020
  16. 0/3 Remove special casing for PSEUDOREF updatesHan-Wen Nienhuys via GitGitGadget, Jul 16, 2020
  17. 1/3 t1400: use git rev-parse for testing PSEUDOREF existenceHan-Wen Nienhuys via GitGitGadget, Jul 16, 2020
  18. 3/3 Make HEAD a PSEUDOREF rather than PER_WORKTREE.Han-Wen Nienhuys via GitGitGadget, Jul 16, 2020
  19. 2/3 Modify pseudo refs through ref backend storageHan-Wen Nienhuys via GitGitGadget, Jul 16, 2020
  20. Johannes SchindelinJul 17, 2020
  21. Han-Wen NienhuysJul 27, 2020
  22. Junio C HamanoJul 16, 2020
  23. Han-Wen NienhuysJul 27, 2020
  24. Junio C HamanoJul 27, 2020
  25. Han-Wen NienhuysAug 3, 2020
  26. Junio C HamanoAug 3, 2020
  27. Junio C HamanoAug 5, 2020
  28. Han-Wen NienhuysAug 5, 2020
  29. Junio C HamanoAug 5, 2020
  30. Han-Wen NienhuysAug 10, 2020
  31. Junio C HamanoAug 10, 2020
  32. Han-Wen NienhuysAug 11, 2020
  33. Junio C HamanoAug 11, 2020
  34. Han-Wen NienhuysAug 19, 2020
  35. Junio C HamanoAug 19, 2020
  36. 0/3 Remove special casing for PSEUDOREF updatesHan-Wen Nienhuys via GitGitGadget, Jul 27, 2020
  37. 1/3 t1400: use git rev-parse for testing PSEUDOREF existenceHan-Wen Nienhuys via GitGitGadget, Jul 27, 2020
  38. 2/3 Modify pseudo refs through ref backend storageHan-Wen Nienhuys via GitGitGadget, Jul 27, 2020
  39. 3/3 Make HEAD a PSEUDOREF rather than PER_WORKTREE.Han-Wen Nienhuys via GitGitGadget, Jul 27, 2020

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.