Re: [PATCH 5/6] submodule: improve submodule_has_commits

2017-05-01 Thread Brandon Williams
On 05/01, Stefan Beller wrote: > On Sun, Apr 30, 2017 at 4:14 PM, Brandon Williams wrote: > > > This hunk of logic is essentially a copy and paste from elsewhere in the > > file. Essentially both code paths were essentially doing the same thing > > (checking if a submodule

Re: [PATCH 5/6] submodule: improve submodule_has_commits

2017-05-01 Thread Stefan Beller
On Sun, Apr 30, 2017 at 4:14 PM, Brandon Williams wrote: > This hunk of logic is essentially a copy and paste from elsewhere in the > file. Essentially both code paths were essentially doing the same thing > (checking if a submodule has a commit) but one of the code paths

Re: [PATCH 5/6] submodule: improve submodule_has_commits

2017-05-01 Thread Brandon Williams
On 04/30, Junio C Hamano wrote: > Brandon Williams writes: > > > oid_array_for_each_unique(commits, check_has_commit, _commit); > > + > > + if (has_commit) { > > + /* > > +* Even if the submodule is checked out and the commit is > > +*

Re: [PATCH 5/6] submodule: improve submodule_has_commits

2017-04-30 Thread Junio C Hamano
Brandon Williams writes: > oid_array_for_each_unique(commits, check_has_commit, _commit); > + > + if (has_commit) { > + /* > + * Even if the submodule is checked out and the commit is > + * present, make sure it is reachable from

Re: [PATCH 5/6] submodule: improve submodule_has_commits

2017-04-30 Thread Brandon Williams
On 04/28, Stefan Beller wrote: > On Fri, Apr 28, 2017 at 4:54 PM, Brandon Williams wrote: > > Teach 'submodule_has_commits()' to ensure that if a commit exists in a > > submodule, that it is also reachable from a ref. > > > > This is a prepritory step prior to merging the logic

Re: [PATCH 5/6] submodule: improve submodule_has_commits

2017-04-28 Thread Stefan Beller
On Fri, Apr 28, 2017 at 4:54 PM, Brandon Williams wrote: > Teach 'submodule_has_commits()' to ensure that if a commit exists in a > submodule, that it is also reachable from a ref. > > This is a prepritory step prior to merging the logic which checkes for

[PATCH 5/6] submodule: improve submodule_has_commits

2017-04-28 Thread Brandon Williams
Teach 'submodule_has_commits()' to ensure that if a commit exists in a submodule, that it is also reachable from a ref. This is a prepritory step prior to merging the logic which checkes for changed submodules when fetching or pushing. Signed-off-by: Brandon Williams ---