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

[PATCH 0/5] refactor unpack-trees

From
Stefan Beller <sbeller@google.com>
Date
Jan 6, 2017, 21:03 UTC
Message-ID
<20170106210330.31761-1-sbeller@google.com>
In-Reply-To
<CAGZ79kaM=Uosm7KAvAP-8w59Tyfc7LZiV3ZOr=PZnBgMCzr2AA@mail.gmail.com>

unpack-trees is a central file needed for the understanding of working tree manipulation. To help with the understanding refactor the code to be more readable.

The first patch was a standalone patch 8 days ago; now incorporated into this series as a v3, reducing the scope of the checkout state.

The second patch removes a single continue statement; it needed some digging to explain, but looks trivial.

The last 3 patches shorten the check_updates function by adding more functions. If we ever want to parallelize file IO then these smaller functions would be the scope to do it, keeping the check_updates as a high level function guiding through the steps what is happening during a working tree update.

Thanks, Stefan

Stefan Beller (5):
  unpack-trees: move checkout state into check_updates
  unpack-trees: remove unneeded continue
  unpack-trees: factor progress setup out of check_updates
  unpack-trees: factor file removal out of check_updates
  unpack-trees: factor working tree update out of check_updates
 unpack-trees.c | 96 ++++++++++++++++++++++++++++++++++++++--------------------
 1 file changed, 64 insertions(+), 32 deletions(-)
-- 
2.11.0.31.g919a8d0.dirty
Previous: Stefan BellerNext: Stefan Beller
Message 2 of 9 in “Re: [PATCHv2] unpack-trees: move checkout state into check_updates”
  1. Stefan BellerJan 6, 2017
  2. 0/5 refactor unpack-treesStefan Beller, Jan 6, 2017
  3. 1/5 unpack-trees: move checkout state into check_updatesStefan Beller, Jan 6, 2017
  4. 5/5 unpack-trees: factor working tree update out of check_updatesStefan Beller, Jan 6, 2017
  5. 4/5 unpack-trees: factor file removal out of check_updatesStefan Beller, Jan 6, 2017
  6. Jeff KingJan 7, 2017
  7. Stefan BellerJan 9, 2017
  8. 3/5 unpack-trees: factor progress setup out of check_updatesStefan Beller, Jan 6, 2017
  9. 2/5 unpack-trees: remove unneeded continueStefan Beller, Jan 6, 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.