Thread (1 message) 1 message, 1 author, 2016-06-15

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:52:33

Nguyen Thai Ngoc Duy [off-list ref] writes:
On Thu, Dec 1, 2011 at 7:27 AM, Junio C Hamano [off-list ref] wrote:
quoted
@@ -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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help