{"thread":{"id":"59581","subject":"[QUESTION] How does Git ref backend work","startedAt":"2023-04-12T06:25:24Z","lastAt":"2023-04-12T06:48:20Z","messageCount":2,"participants":["ZheNing Hu"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"475186","messageId":"CAOLTT8Tg_Gkj6jid-sH_A=-xajN=rd=Vgh-nqHY5NcJ4-VExbg@mail.gmail.com","threadId":"59581","inReplyTo":null,"subject":"[QUESTION] How does Git ref backend work","fromName":"ZheNing Hu","fromEmail":"adlternative@gmail.com","sentAt":"2023-04-12T06:25:30Z","receivedAt":"2023-04-12T06:25:24Z","isPatch":false,"sender":{"key":"adlternative@gmail.com","avatar":"https://avatars.githubusercontent.com/u/58138461?v=4"},"body":"1. I noticed that normally refs transactions use the refs files-backend,\nlooking at the reference transaction of refs files-backend alone:\nFirst, it opens a transaction in memory, then multiple update items\nare added in memory, and finally, when the reference transaction\nis committed, it creates a ref.lock for each update item, renames it\nto the real address of the ref.\n\nbut there seems to be some packed-backend logic coupled inside of\nfiles-backend. This makes me wonder why these ref backends are not\nindependent?\n\n2. Is the reftable backend in a usable state? How can I enable it?\nI couldn't find any clues on https://www.git-scm.com/docs/reftable.\n3. Will future git refs backend possibly support external storage media\ne.g. Redis?\n\nThanks,\n--\nZheNing Hu\n"},{"id":"475196","messageId":"CAOLTT8RAhCY_Xo_jDopggCVEF8t5Kghji4h+Td6Gja_3kMSpJQ@mail.gmail.com","threadId":"59581","inReplyTo":"CAOLTT8Tg_Gkj6jid-sH_A=-xajN=rd=Vgh-nqHY5NcJ4-VExbg@mail.gmail.com","subject":"Re: [QUESTION] How does Git ref backend work","fromName":"ZheNing Hu","fromEmail":"adlternative@gmail.com","sentAt":"2023-04-12T06:48:25Z","receivedAt":"2023-04-12T06:48:20Z","isPatch":false,"sender":{"key":"adlternative@gmail.com","avatar":"https://avatars.githubusercontent.com/u/58138461?v=4"},"body":"ZheNing Hu <adlternative@gmail.com> 于2023年4月12日周三 14:25写道：\n>\n> 1. I noticed that normally refs transactions use the refs files-backend,\n> looking at the reference transaction of refs files-backend alone:\n> First, it opens a transaction in memory, then multiple update items\n> are added in memory, and finally, when the reference transaction\n> is committed, it creates a ref.lock for each update item, renames it\n> to the real address of the ref.\n>\n> but there seems to be some packed-backend logic coupled inside of\n> files-backend. This makes me wonder why these ref backends are not\n> independent?\n>\n> 2. Is the reftable backend in a usable state? How can I enable it?\n> I couldn't find any clues on https://www.git-scm.com/docs/reftable.\n> 3. Will future git refs backend possibly support external storage media\n> e.g. Redis?\n>\n\nI just found a similar discussion on the mailing list:\nhttps://lore.kernel.org/git/CAJoAoZn7Nt37Eh17dpLDK+YX2BaEaAaii2rJPXO3L0BmQQkcgQ@mail.gmail.com/\n\n> Thanks,\n> --\n> ZheNing Hu\n"}]}