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

Re: [PATCH v2 5/5] bulk-checkin: replace fast-import based implementation

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 1, 2011, 15:46 UTC
Message-ID
<7v39d4pa4s.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CACsJy8D5BqqkXCa7kczcNBxjt=G2d2ZXUToncR2pBGRuZ3gPKg@mail.gmail.com>
Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:
Show 22 quoted lines
> On Thu, Dec 1, 2011 at 7:27 AM, Junio C Hamano <gitster@pobox.com> wrote:
>> @@ -458,11 +459,15 @@ int cmd_add(int argc, const char **argv, const char *prefix)
>>                free(seen);
>>        }
>>
>> +       plug_bulk_checkin();
>> +
>>        exit_status |= add_files_to_cache(prefix, pathspec, flags);
>>
>>        if (add_new_files)
>>                exit_status |= add_files(&dir, flags);
>>
>> +       unplug_bulk_checkin();
>> +
>>  finish:
>>        if (active_cache_changed) {
>>                if (write_cache(newfd, active_cache, active_nr) ||
>
> Also do the same for git-commit, except as-is commit case, for
> updating large files?
>
> update-index should also learn about this,...
I didn't do any of the above in this series and that was on purpose.

Getting plug/unplug (and all the machinery that they are related to) to do the right thing when they are called is far more important at this stage than figuring out when it is appropriate to plug and unplug in various random programs, it is sufficient to have one canonical and simplest callsite pair as an example in the primary interface to add new objects (i.e. "git add") for that purpose, and it is not too cumbersome for early adopters to remember using "git add" when adding oddball large blobs instead of using "commit -a".

In short, I wanted to keep the patch to the minimum to avoid distracting capable reviewers (which is in short supply these days).

I wouldn't stop you or anybody from preparing a patch series that adds plug/unplug pairs before the machinery is perfected, so that such an effort can expose a corner case where the machinery and the API presented in this series is inadequate and can use improvements. Once the machinery gets perfected, submit such a patch series to add users that are well tested.

Thanks.
Previous: Nguyen Thai Ngoc DuyNext: Junio C Hamano
Message 8 of 15 in “Bulk Check-in”
  1. 0/5 Bulk Check-inJunio C Hamano, Dec 1, 2011
  2. 1/5 write_pack_header(): a helper functionJunio C Hamano, Dec 1, 2011
  3. 2/5 create_tmp_packfile(): a helper functionJunio C Hamano, Dec 1, 2011
  4. 3/5 finish_tmp_packfile(): a helper functionJunio C Hamano, Dec 1, 2011
  5. 4/5 csum-file: introduce sha1file_checkpointJunio C Hamano, Dec 1, 2011
  6. 5/5 bulk-checkin: replace fast-import based implementationJunio C Hamano, Dec 1, 2011
  7. Nguyen Thai Ngoc DuyDec 1, 2011
  8. Junio C HamanoDec 1, 2011
  9. 0/6 Bulk check-inJunio C Hamano, Dec 2, 2011
  10. 1/6 bulk-checkin: replace fast-import based implementationJunio C Hamano, Dec 2, 2011
  11. 2/6 varint-in-pack: refactor varint encoding/decodingJunio C Hamano, Dec 2, 2011
  12. 3/6 new representation types in the packstreamJunio C Hamano, Dec 2, 2011
  13. 4/6 bulk-checkin: allow the same data to be multiply hashedJunio C Hamano, Dec 2, 2011
  14. 5/6 bulk-checkin: support chunked-object encodingJunio C Hamano, Dec 2, 2011
  15. 6/6 chunked-object: fallback checkout codepathsJunio C Hamano, Dec 2, 2011

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.