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

Re: none

From
Han-Wen Nienhuys <hanwen@google.com>
Date
Nov 20, 2019, 05:00 UTC
Message-ID
<CAFQ2z_N611Y+3TXWLsOKjL=muk3XON11gaS1qyGxZUWp8Leqag@mail.gmail.com>
In-Reply-To
<xmqqsgmjb13r.fsf@gitster-ct.c.googlers.com>
On Tue, Nov 19, 2019 at 8:53 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 8 quoted lines
> My initial impression was that the API overuses typedef.  We tend to
> avoid doing
>
>         struct _foo { ... };
>         typedef struct _foo foo;
>
> and instead write "struct foo" explicitly to make us well aware of
> what we are talking about.

Thanks, i'll have a look at changing it. I use typedef mainly for ergonomics, but now that the code is written, I can introduce more verbosity.

> But the set of operations defined in the header file seemed at the
> right granularity in order to interface with the refs.h & refs/* API
> we have.  It however was unclear to me how transactional ref updates
> would work with it.

Transactions have to interface with the file system. I imagine that different libraries (libgit vs. cgit) would have different primitives for dealing with the file system, hence I haven't implemented that part. Do you have an idea of how I could implement it in a way that is agnostic of libgit2 vs. cgit?

-- 
Han-Wen Nienhuys - Google Munich
I work 80%. Don't expect answers from me on Fridays.
--

Google Germany GmbH, Erika-Mann-Strasse 33, 80636 Munich

Registergericht und -nummer: Hamburg, HRB 86891

Sitz der Gesellschaft: Hamburg

Geschäftsführer: Paul Manicle, Halimah DeLaine Prado
Previous: Junio C HamanoNext: Han-Wen Nienhuys
Message 3 of 6 in “”
  1. Han-Wen NienhuysNov 20, 2019
  2. Junio C HamanoNov 20, 2019
  3. Han-Wen NienhuysNov 20, 2019
  4. reftable (was: Re: none)Han-Wen Nienhuys, Nov 22, 2019
  5. Taylor BlauNov 20, 2019
  6. Christian CouderNov 20, 2019

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.