From: Junio C Hamano <email@example.com> To: Stefan Beller <firstname.lastname@example.org> Cc: Jonathan Nieder <email@example.com>, "git\@vger.kernel.org" <firstname.lastname@example.org> Subject: Re: [PATCH] submodule: use cheaper check for submodule pushes Date: Thu, 13 Jul 2017 11:37:04 -0700 Message-ID: <email@example.com> (raw) In-Reply-To: <CAGZ79kaHX-YCMv01T-QE=mYeymjTnwrpg9-bsOrCjg3NWEunDA@mail.gmail.com> Stefan Beller <firstname.lastname@example.org> writes: > On Wed, Jul 12, 2017 at 5:53 PM, Junio C Hamano <email@example.com> wrote: >> Jonathan Nieder <firstname.lastname@example.org> writes: >> >>>> In the function push_submodule we use add_submodule_odb to determine >>>> if a submodule has been populated. However the function does not work with >>>> the submodules objects that are added, instead a new child process is used >>>> to perform the actual push in the submodule. >>>> >>>> Use is_submodule_populated that is cheaper to guard from unpopulated >>>> submodules. >>>> >>>>  'push_submodule' was added in eb21c732d6 (push: teach >>>> --recurse-submodules the on-demand option, 2012-03-29) >>>>  'add_submodule_odb' was introduced in 752c0c2492 (Add the >>>> --submodule option to the diff option family, 2009-10-19) >>>>  'is_submodule_populated' was added in 5688c28d81 (submodules: >>>> add helper to determine if a submodule is populated, 2016-12-16) >>> >>> These footnotes don't answer the question that I really have: why did >>> this use add_submodule_odb in the first place? >>> >>> E.g. did the ref iteration code require access to the object store >>> previously and stop requiring it later? >> >> Yes, the most important question is if it is safe to lose the access >> to the object store of the submodule. It is an endgame we should >> aim for to get rid of add_submodule_odb(), but does the rest of this >> codepath not require objects in the submodule at all or do we still >> need to change something to make it so? > > Yes, as the code in the current form as well as in its first occurrence > used the result of add_submodule_odb to determine if to spawn a child process. The original added so that the return value of the call can be used for that, and the current code still uses the return value for that purpose. That much is already known. I think Jonathan's question (which I concurred) is if we also ended up relying on the side effect of calling that function (i.e. being able to now find objects that are not in our repository but in the submodule's object store). By looking at the eb21c732d6, we can tell that the original didn't mean to and didn't add any code that relies on the ability to be able to read from the submodule object store. I am not sure if that is still true after 5 years (i.e. is there any new code added in the meantime that made us depend on the ability to read from submodule object store?). My hunch (and hope) is that we are probably safe, but that is a lot weaker than "yes this is a good change we want to apply".
next prev parent reply index Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-07-12 23:45 Stefan Beller 2017-07-13 0:01 ` Jonathan Nieder 2017-07-13 0:09 ` Stefan Beller 2017-07-13 0:53 ` Junio C Hamano 2017-07-13 5:14 ` Stefan Beller 2017-07-13 18:37 ` Junio C Hamano [this message] 2017-07-13 19:39 ` Stefan Beller 2017-07-13 20:48 ` Jonathan Nieder 2017-07-13 20:54 ` Stefan Beller 2017-08-15 22:43 ` [PATCH] push: do not add submodule odb as an alternate when recursing on demand Stefan Beller 2017-08-15 23:10 ` Jonathan Nieder 2017-08-15 23:14 ` Jonathan Nieder 2017-08-15 23:27 ` Stefan Beller 2017-08-15 23:23 ` Junio C Hamano 2017-08-15 23:31 ` Stefan Beller 2017-08-16 0:11 ` Junio C Hamano 2017-08-16 1:05 ` Stefan Beller 2017-08-16 2:08 ` Jonathan Nieder 2017-08-16 5:52 ` Stefan Beller 2017-08-16 16:35 ` Heiko Voigt
Reply instructions: You may reply publically to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style List information: http://vger.kernel.org/majordomo-info.html * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
firstname.lastname@example.org mailing list mirror (one of many) Archives are clonable: git clone --mirror https://public-inbox.org/git git clone --mirror http://ou63pmih66umazou.onion/git git clone --mirror http://czquwvybam4bgbro.onion/git git clone --mirror http://hjrcffqmbrq6wope.onion/git Newsgroups are available over NNTP: nntp://news.public-inbox.org/inbox.comp.version-control.git nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git nntp://news.gmane.org/gmane.comp.version-control.git note: .onion URLs require Tor: https://www.torproject.org/ or Tor2web: https://www.tor2web.org/ AGPL code for this site: git clone https://public-inbox.org/ public-inbox