Nguyen Thai Ngoc Duy <pclouds@xxxxxxxxx> writes: > On Thu, Dec 1, 2011 at 7:27 AM, Junio C Hamano <gitster@xxxxxxxxx> 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. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html