Thread (1 message) 1 message, 1 author, 2022-02-17

Re: [PATCH v2 3/7] fetch: control lifecycle of FETCH_HEAD in a single place

From: Junio C Hamano <hidden>
Date: 2022-02-17 22:12:26

Patrick Steinhardt [off-list ref] writes:
There are two different locations where we're appending to FETCH_HEAD:
first when storing updated references, and second when backfilling tags.
Both times we open the file, append to it and then commit it into place,
which is essentially duplicate work.

Improve the lifecycle of updating FETCH_HEAD by opening and committing
it once in `do_fetch()`, where we pass the structure down to the code
which wants to append to it.
OK.  Each call to store_updated_refs() used to be responsible for
opening, appending, committing, and closing FETCH_HEAD.  We now make
do_fetch() responsible for opening, committing, and closing, and let
the direct and indirect callers of fetch_and_consume_refs() only
worry about appending to it.  Makes sense.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help