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

Re: reversion in GIT_COMMON_DIR refs path

From
Duy Nguyen <pclouds@gmail.com>
Date
May 22, 2017, 11:11 UTC
Message-ID
<CACsJy8C4EZnB2PkJw5t7c007vRmb8DDKk41p2azvjOnJNO0n7Q@mail.gmail.com>
In-Reply-To
<20170519143727.edi4ni7v5pywm7dk@kitenet.net>
On Fri, May 19, 2017 at 9:37 PM, Joey Hess <id@joeyh.name> wrote:
Show 20 quoted lines
> Joey Hess wrote:
>> Bisecting this test suite failure
>> https://git-annex.branchable.com/git-annex_in_nixpkgs_fails_with_git-2.13.0/
>> I landed on commit f57f37e2e1bf11ab4cdfd221ad47e961ba9353a0 to git.
>>
>> It seems that changed resolving refs paths when GIT_DIR and GIT_COMMON_DIR
>> are both set. While before refs were looked for in GIT_COMMON_DIR,
>> now they're not.
>
> In case there's any doubt about whether this is a reversion or an
> intentional change, see gitrepository-layout(5):
>
>        refs
>            References are stored in subdirectories of this directory. The git
>            prune command knows to preserve objects reachable from refs found
>            in this directory and its subdirectories. This directory is ignored
>            if $GIT_COMMON_DIR is set and "$GIT_COMMON_DIR/refs" will be used
>            instead.
>
> So the documented behavior is broken.

It's a gray area. When I wrote that I think I forgot about per-worktree refs (refs/bisect/*) so "This directory is ignored" is not completely true. The final line (probably won't help you much) is "per-repo refs must be read from $GIT_COMMON_DIR/refs, per-worktree from $GIT_DIR". The fact that we looked per-repo (like master) in $GIT_DIR is probably an unwanted side effect.

-- 
Duy
Previous: Joey Hess
Message 14 of 14 in “reversion in GIT_COMMON_DIR refs path”
  1. Joey HessMay 16, 2017
  2. Ævar Arnfjörð BjarmasonMay 16, 2017
  3. Joey HessMay 16, 2017
  4. tests: add an optional test to test git-annexÆvar Arnfjörð Bjarmason, May 16, 2017
  5. Joey HessMay 16, 2017
  6. Junio C HamanoMay 17, 2017
  7. Ævar Arnfjörð BjarmasonMay 17, 2017
  8. Junio C HamanoMay 17, 2017
  9. Ævar Arnfjörð BjarmasonMay 17, 2017
  10. Stefan BellerMay 17, 2017
  11. Brandon WilliamsMay 17, 2017
  12. Brandon WilliamsMay 17, 2017
  13. Joey HessMay 19, 2017
  14. Duy NguyenMay 22, 2017

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.