Re: [PATCH v2] receive-pack: purge temporary data if no command is ready to run
- From
Bojun Chen <bojun.cbj@gmail.com>
- Date
- Feb 5, 2022, 07:19 UTC
- Message-ID
- <CADuS7Apcr0r6F1UQf1WKmVuW+SM_wD1MBPA9Szvd1pF9zJjsUw@mail.gmail.com>
- In-Reply-To
- <xmqq5ypvpgzr.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> 于2022年2月4日周五 09:17写道:
Show 31 quoted lines
> > Chen BoJun <bojun.cbj@gmail.com> writes: > > > + /* > > + * If there is no command ready to run, should return directly to destroy > > + * temporary data in the quarantine area. > > + */ > > + for (cmd = commands; cmd && cmd->error_string; cmd = cmd->next) > > + ; /* nothing */ > > + if (!cmd) > > + return; > > + > > /* > > * Now we'll start writing out refs, which means the objects need > > * to be in their final positions so that other processes can see them. > > One thing I notice is that the first thing we do, after making the > new objects available to us, is to check if we are making any > conflicting update, e.g. > > git push origin master:master next:master > > would try to update the same ref with different objects, and will be > rejected. > > This check can _almost_ be doable without being able to access the > new objects, and as a follow-on work, it might not be a bad little > project to see how we can move the call to check_aliased_updates() > before this loop we are adding in this patch (#leftoverbits). > > Thanks.
Thanks for your suggestion, I agree with you. But I'm confused should I continue in this patch or start a new patch.