Re: Adding nested repository with slash adds files instead of gitlink

2018-06-19 Thread Heiko Voigt
On Mon, Jun 18, 2018 at 11:12:15AM -0700, Brandon Williams wrote: > On 06/18, Duy Nguyen wrote: > > This sounds like the submodule specific code in pathspec.c, which has > > been replaced with something else in bw/pathspec-sans-the-index. If > > you have time, try a version without those changes

Re: Adding nested repository with slash adds files instead of gitlink

2018-06-19 Thread Heiko Voigt
Hi, On Mon, Jun 18, 2018 at 05:55:44PM +0200, Kevin Daudt wrote: > On Mon, Jun 18, 2018 at 01:19:19PM +0200, Heiko Voigt wrote: > > I just discovered that when you have a slash at the end of a nested > > repository, the files contained in the repository get added instead of

Adding nested repository with slash adds files instead of gitlink

2018-06-18 Thread Heiko Voigt
Hi, I just discovered that when you have a slash at the end of a nested repository, the files contained in the repository get added instead of the gitlink. I found this when I was adding a submodule and wanted to commit a small change before that. You get the slash by using tab autocompletion.

Re: [PATCH] t5526: test recursive submodules when fetching moved submodules

2018-06-14 Thread Heiko Voigt
On Thu, Jun 14, 2018 at 10:37:30AM -0700, Stefan Beller wrote: > The topic merged in 0c7ecb7c311 (Merge branch 'sb/submodule-move-nested', > 2018-05-08) provided support for moving nested submodules. > > Remove the NEEDSWORK comment and implement the nested submodules test as > the comment hinted

Re: [PATCH] submodule: fix NULL correctness in renamed broken submodules

2018-06-14 Thread Heiko Voigt
he is a NULL > pointer just return the first submodule. Can be used to check whether > there are any submodules parsed.") > > Reported-by: Duy Nguyen > Helped-by: Duy Nguyen > Helped-by: Heiko Voigt > Signed-off-by: Stefan Beller > --- Looks good to me. Cheers Heiko

Re: BUG: submodule code prints '(null)'

2018-06-14 Thread Heiko Voigt
On Mon, Jun 11, 2018 at 03:56:16PM -0700, Stefan Beller wrote: > On Sat, Jun 9, 2018 at 4:04 AM Duy Nguyen wrote: > > > > On Tue, Jun 05, 2018 at 05:31:41PM +0200, Duy Nguyen wrote: > > > I do not know how to reproduce this (and didn't bother to look deeply > > > into it after I found it was not

Re: git merge banch w/ different submodule revision

2018-05-04 Thread Heiko Voigt
Hi, On Fri, May 04, 2018 at 08:29:32AM +, Middelschulte, Leif wrote: > Am Donnerstag, den 03.05.2018, 18:42 +0200 schrieb Heiko Voigt: > > I still do not understand how the current behaviour is mismatching with > > users expectations. Let's assume that you directly tracked the

Re: git merge banch w/ different submodule revision

2018-05-03 Thread Heiko Voigt
Hi, On Wed, May 02, 2018 at 07:30:25AM +, Middelschulte, Leif wrote: > Am Montag, den 30.04.2018, 19:02 +0200 schrieb Heiko Voigt: > > On Thu, Apr 26, 2018 at 03:19:36PM -0700, Stefan Beller wrote: > > > Stefan wrote: > > > > See > > &

Re: git merge banch w/ different submodule revision

2018-04-30 Thread Heiko Voigt
On Thu, Apr 26, 2018 at 03:19:36PM -0700, Stefan Beller wrote: > Stefan wrote: > > See > > https://github.com/git/git/commit/68d03e4a6e448aa557f52adef92595ac4d6cd4bd > > (68d03e4a6e (Implement automatic fast-forward merge for submodules, > > 2010-07-07) > > to explain the situation you

Re: submodule..ignore vs git add -u

2018-03-15 Thread Heiko Voigt
Hi, On Mon, Mar 12, 2018 at 04:59:25PM +0100, Miklos Vajna wrote: > Let's say I have a fairly simple submodule setup where I do 'git > checkout' inside the submodule to check out a different commit, so the > outer repo 'git diff' shows a submodule update. > > In that case > > git config

Re: [PATCH] status: do not get confused by submodules in excluded directories

2017-10-25 Thread Heiko Voigt
On Wed, Oct 25, 2017 at 10:28:25AM +0900, Junio C Hamano wrote: > Heiko Voigt <hvo...@hvoigt.net> writes: > > > On Tue, Oct 24, 2017 at 02:18:49PM +0900, Junio C Hamano wrote: > >> Johannes Schindelin <johannes.schinde...@gmx.de> writes: > >> >

Re: [PATCH] status: do not get confused by submodules in excluded directories

2017-10-24 Thread Heiko Voigt
On Tue, Oct 24, 2017 at 02:18:49PM +0900, Junio C Hamano wrote: > Johannes Schindelin writes: > > > We meticulously pass the `exclude` flag to the `treat_directory()` > > function so that we can indicate that files in it are excluded rather > > than untracked when

Re: [PATCH 1/2] t5526: check for name/path collision in submodule fetch

2017-10-23 Thread Heiko Voigt
On Thu, Oct 19, 2017 at 11:11:08AM -0700, Stefan Beller wrote: > Signed-off-by: Stefan Beller > --- > > This is just to test the corner case we're discussing. > Applies on top of origin/hv/fetch-moved-submodules-on-demand. > > > t/t5526-fetch-submodules.sh | 42

Re: [PATCH 2/2] fetch, push: keep separate lists of submodules and gitlinks

2017-10-23 Thread Heiko Voigt
On Thu, Oct 19, 2017 at 11:11:09AM -0700, Stefan Beller wrote: > Currently when fetching we collect the names of submodules to be fetched > in a list. As we also want to support fetching 'gitlinks, that happen to > have a repo checked out at the right place', we'll just pretend that these > are

Re: [PATCH v4 3/3] submodule: simplify decision tree whether to or not to fetch

2017-10-19 Thread Heiko Voigt
On Thu, Oct 19, 2017 at 09:36:47AM +0900, Junio C Hamano wrote: > Brandon Williams <bmw...@google.com> writes: > > > On 10/16, Heiko Voigt wrote: > >> To make extending this logic later easier. > > > > This makes things so much clearer, thanks! > >

[PATCH v4 2/3] implement fetching of moved submodules

2017-10-16 Thread Heiko Voigt
whose default name collides with a configured one. With the change described above we implement 'on-demand' fetching of changes in moved submodules. Signed-off-by: Heiko Voigt <hvo...@hvoigt.net> --- submodule-config.h | 3 + submodule.c

[PATCH v4 3/3] submodule: simplify decision tree whether to or not to fetch

2017-10-16 Thread Heiko Voigt
To make extending this logic later easier. Signed-off-by: Heiko Voigt <hvo...@hvoigt.net> --- submodule.c | 74 ++--- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/submodule.c b/submodule.c index 71d1773e2e..82d2

[PATCH v4 1/3] fetch: add test to make sure we stay backwards compatible

2017-10-16 Thread Heiko Voigt
The current implementation of submodules supports on-demand fetch if there is no .gitmodules entry for a submodule. Let's add a test to document this behavior. Signed-off-by: Heiko Voigt <hvo...@hvoigt.net> --- t/t5526-fetch-submodules.sh | 42 +-

[PATCH v4 0/3] implement fetching of moved submodules

2017-10-16 Thread Heiko Voigt
compatibility. To implement this compatibility we construct a default name for gitlinks if there is a repository found at their location in the worktree. Cheers Heiko Heiko Voigt (3): fetch: add test to make sure we stay backwards compatible implement fetching of moved submodules submodule

Re: [RFC PATCH 2/4] change submodule push test to use proper repository setup

2017-10-11 Thread Heiko Voigt
On Wed, Oct 11, 2017 at 08:31:37AM +0900, Junio C Hamano wrote: > Stefan Beller writes: > > > So you propose to make git-add behave like "git submodule add" > > (i.e. also add the .gitmodules entry for name/path/URL), which I > > like from a submodule perspective. > > > >

Re: [RFC PATCH 2/4] change submodule push test to use proper repository setup

2017-10-11 Thread Heiko Voigt
On Tue, Oct 10, 2017 at 11:39:21AM -0700, Stefan Beller wrote: > So you propose to make git-add behave like "git submodule add" > (i.e. also add the .gitmodules entry for name/path/URL), which I > like from a submodule perspective. Well more like: clone and add will behave like "git submodule

Re: [RFC PATCH 2/4] change submodule push test to use proper repository setup

2017-10-10 Thread Heiko Voigt
Hi, On Mon, Oct 09, 2017 at 11:20:51AM -0700, Stefan Beller wrote: > On Fri, Oct 6, 2017 at 3:32 PM, Heiko Voigt <hvo...@hvoigt.net> wrote: > > NOTE: The argument in this message is not correct, see description in > > cover letter. > > > > The setup of the r

Re: "git rm" seems to do recursive removal even without "-r"

2017-10-10 Thread Heiko Voigt
On Sun, Oct 08, 2017 at 07:56:20AM -0400, Robert P. J. Day wrote: > but as i asked in my earlier post, if i wanted to remove *all* files > with names of "Makefile*", why can't i use: > > $ git rm 'Makefile*' > > just as i used: > > $ git rm '*.c' > > are those not both acceptable

[RFC PATCH v3 3/4] implement fetching of moved submodules

2017-10-06 Thread Heiko Voigt
words: We now require a name for a submodule repository. Signed-off-by: Heiko Voigt <hvo...@hvoigt.net> --- No changes from the previous version here. submodule.c | 91 + t/t5526-fetch-submodules.sh | 35 + 2

[RFC PATCH v3 4/4] submodule: simplify decision tree whether to or not to fetch

2017-10-06 Thread Heiko Voigt
To make extending this logic later easier. Signed-off-by: Heiko Voigt <hvo...@hvoigt.net> --- This should also be the same as in the previous version. submodule.c | 74 ++--- 1 file changed, 37 insertions(+), 37 deletions(-) diff

[RFC PATCH 2/4] change submodule push test to use proper repository setup

2017-10-06 Thread Heiko Voigt
to one we could expect on a users setup. Signed-off-by: Heiko Voigt <hvo...@hvoigt.net> --- As mentioned in the cover letter. This seems to be the only test that ensures that we stay compatible with setups without .gitmodules. Maybe we should add/revive some? Cheers Heiko t/t5531-deep-sub

[RFC PATCH 1/4] fetch: add test to make sure we stay backwards compatible

2017-10-06 Thread Heiko Voigt
The current implementation of submodules supports on-demand fetch if there is no .gitmodules entry for a submodule. Let's add a test to document this behavior. Signed-off-by: Heiko Voigt <hvo...@hvoigt.net> --- t/t5526-fetch-submodules.sh | 42 +-

[RFC PATCH v3 0/4] implement fetching of moved submodules

2017-10-06 Thread Heiko Voigt
the plain manual setup without .gitmodules files. Just something, I think, we should keep in mind. Apart from the tests nothing has been added in this iteration. Since I finally have a working test now I will continue with reviving the fallback to paths. Cheers Heiko Heiko Voigt (4): fetch: add test

Re: [PATCH v2] add test for bug in git-mv for recursive submodules

2017-09-20 Thread Heiko Voigt
On Mon, Sep 18, 2017 at 01:03:32PM -0700, Stefan Beller wrote: > >> Took a little while but here is a more clean patch creating individual > >> submodules for the nesting. > >> > >> Cheers Heiko > > Thanks for writing this test! No worries. :) > > Thanks. Stefan, does this look good to you

[RFC PATCH v2 2/2] submodule: simplify decision tree whether to or not to fetch

2017-09-15 Thread Heiko Voigt
To make extending this logic later easier. Signed-off-by: Heiko Voigt <hvo...@hvoigt.net> --- submodule.c | 74 ++--- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/submodule.c b/submodule.c index 38b9905e43..fa44

[RFC PATCH v2 1/2] implement fetching of moved submodules

2017-09-15 Thread Heiko Voigt
-by: Heiko Voigt <hvo...@hvoigt.net> --- This an update of the previous series[1] to the current master. The fallback is still missing but now it should not conflict with any topics in flight anymore (hopefully). Cheers Heiko [1] https://public-inbox.org/git/20170817105349.gc52...@book.hvoi

[PATCH v2] add test for bug in git-mv for recursive submodules

2017-09-15 Thread Heiko Voigt
submodules. Lets add a test to document. Signed-off-by: Heiko Voigt <hvo...@hvoigt.net> --- On Fri, Aug 18, 2017 at 12:04:03PM -0700, Stefan Beller wrote: > > I just copied the shortcut that they were adding themselfes as submodule > > in 'setup submodule'. The whole setup of submo

Re: [PATCH 2/4] push, fetch: error out for submodule entries not pointing to commits

2017-09-14 Thread Heiko Voigt
On Tue, Sep 12, 2017 at 10:30:27AM -0700, Jonathan Nieder wrote: > From: Stefan Beller > > The check_has_commit helper uses resolves a submodule entry to a > commit, when validating its existence. As a side effect this means > tolerates a submodule entry pointing to a tag,

Re: Submodule regression in 2.14?

2017-08-25 Thread Heiko Voigt
On Tue, Aug 22, 2017 at 11:10:52AM -0700, Stefan Beller wrote: > On Tue, Aug 22, 2017 at 8:33 AM, Heiko Voigt <hvo...@hvoigt.net> wrote: > > On Mon, Aug 21, 2017 at 09:42:54AM -0700, Stefan Beller wrote: > >> On Mon, Aug 21, 2017 at 9:05 AM, Heiko Voigt <hvo...@hvoig

Re: Submodule regression in 2.14?

2017-08-22 Thread Heiko Voigt
On Mon, Aug 21, 2017 at 09:48:51AM -0700, Junio C Hamano wrote: > Heiko Voigt <hvo...@hvoigt.net> writes: > > > So I think it is important that there are commits in the submodule so > > its history makes sense independently for others. > > I was tryin

Re: Submodule regression in 2.14?

2017-08-22 Thread Heiko Voigt
On Mon, Aug 21, 2017 at 09:42:54AM -0700, Stefan Beller wrote: > On Mon, Aug 21, 2017 at 9:05 AM, Heiko Voigt <hvo...@hvoigt.net> wrote: > > On Fri, Aug 18, 2017 at 11:51:13PM -0700, Junio C Hamano wrote: > >> As long as we are talking about idealized future world (wel

Re: [GSoC][PATCH 3/4] submodule: port set_name_rev() from shell to C

2017-08-21 Thread Heiko Voigt
On Mon, Aug 21, 2017 at 09:45:14PM +0530, Prathamesh Chavan wrote: > Function set_name_rev() is ported from git-submodule to the > submodule--helper builtin. The function get_name_rev() generates the > value of the revision name as required, and the function > print_name_rev() handles the

Re: [PATCH] pull: respect submodule update configuration

2017-08-21 Thread Heiko Voigt
On Fri, Aug 18, 2017 at 11:24:47PM -0700, Junio C Hamano wrote: > Stefan Beller writes: > > > From: Lars Schneider > > > > Do not override the submodule configuration in the call to update > > the submodules, but give a weaker default. > > > >

Re: Submodule regression in 2.14?

2017-08-21 Thread Heiko Voigt
On Fri, Aug 18, 2017 at 11:51:13PM -0700, Junio C Hamano wrote: > As long as we are talking about idealized future world (well, at > least an idea of somebody's "ideal", not necessarily shared by > everybody), I wonder if there is even any need to have commits in > submodules in such a world. To

Re: [PATCH] add test for bug in git-mv with nested submodules

2017-08-18 Thread Heiko Voigt
On Thu, Aug 17, 2017 at 12:05:56PM -0700, Stefan Beller wrote: > On Thu, Aug 17, 2017 at 3:34 AM, Heiko Voigt <hvo...@hvoigt.net> wrote: > > When using git-mv with a submodule it will detect that and update the > > paths for its configurations (.gitmodules, worktree and gi

Re: [RFC PATCH 1/2] implement fetching of moved submodules

2017-08-18 Thread Heiko Voigt
On Thu, Aug 17, 2017 at 10:20:13AM -0700, Stefan Beller wrote: > On Thu, Aug 17, 2017 at 3:53 AM, Heiko Voigt <hvo...@hvoigt.net> wrote: > > We store the changed submodules paths to calculate which submodule needs > > fetching. This does not work for moved submodules

Re: [RFC PATCH 2/2] submodule: simplify decision tree whether to or not to fetch

2017-08-18 Thread Heiko Voigt
On Thu, Aug 17, 2017 at 10:50:07AM -0700, Brandon Williams wrote: > On 08/17, Stefan Beller wrote: > > On Thu, Aug 17, 2017 at 4:00 AM, Heiko Voigt <hvo...@hvoigt.net> wrote: > > > To make extending this logic later easier. > > > > > > Sig

[RFC PATCH 2/2] submodule: simplify decision tree whether to or not to fetch

2017-08-17 Thread Heiko Voigt
To make extending this logic later easier. Signed-off-by: Heiko Voigt <hvo...@hvoigt.net> --- I am quite sure I replicated the same logic but a few more eyes would be appreciated. Cheers Heiko submodule.c | 55 +++ 1 file chang

[RFC PATCH 1/2] implement fetching of moved submodules

2017-08-17 Thread Heiko Voigt
words: It breaks if we do not get a name for a repository. IIRC, consensus was that this is a requirement to get nice submodule handling these days? Signed-off-by: Heiko Voigt <hvo...@hvoigt.net> --- I updated the leftover code from my series implementing recursive fetch for moved submod

[PATCH] t5526: fix some broken && chains

2017-08-17 Thread Heiko Voigt
Signed-off-by: Heiko Voigt <hvo...@hvoigt.net> --- t/t5526-fetch-submodules.sh | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/t/t5526-fetch-submodules.sh b/t/t5526-fetch-submodules.sh index ce788e9..22a7358 100755 --- a/t/t5526-fetch-submodules.sh +++ b/t/t5526

[PATCH] add test for bug in git-mv with nested submodules

2017-08-17 Thread Heiko Voigt
. Lets add a test to document. Signed-off-by: Heiko Voigt <hvo...@hvoigt.net> --- t/t7001-mv.sh | 9 + 1 file changed, 9 insertions(+) diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh index e365d1f..39f8aed 100755 --- a/t/t7001-mv.sh +++ b/t/t7001-mv.sh @@ -491,4 +491,13 @@ test_expect_s

Re: [PATCH] push: do not add submodule odb as an alternate when recursing on demand

2017-08-16 Thread Heiko Voigt
Hi, was about to write that we are maybe overly cautious here. Because the current way a submodule ends up in the list to be pushed is through: find_unpushed_submodules() that itself collects all changed submodules when submodule_needs_pushing() is true. In there we have this: if

Re: [PATCH v2 02/15] submodule: don't use submodule_from_name

2017-08-11 Thread Heiko Voigt
On Fri, Aug 04, 2017 at 02:53:11PM -0700, Brandon Williams wrote: > On 08/03, Stefan Beller wrote: > > On Thu, Aug 3, 2017 at 11:19 AM, Brandon Williams wrote: > > > The function 'submodule_from_name()' is being used incorrectly here as a > > > submodule path is being used

Re: [PATCH v2 14/15] unpack-trees: improve loading of .gitmodules

2017-08-11 Thread Heiko Voigt
On Thu, Aug 03, 2017 at 11:19:59AM -0700, Brandon Williams wrote: > diff --git a/unpack-trees.c b/unpack-trees.c > index 5dce7ff7d..3c7f464fa 100644 > --- a/unpack-trees.c > +++ b/unpack-trees.c > @@ -1,5 +1,6 @@ > #define NO_THE_INDEX_COMPATIBILITY_MACROS > #include "cache.h" > +#include

Re: [PATCH 02/15] submodule: don't use submodule_from_name

2017-08-11 Thread Heiko Voigt
Hi, sorry for the late reply, just stumpled upon this. On Mon, Jul 31, 2017 at 01:43:04PM -0700, Stefan Beller wrote: > On Sun, Jul 30, 2017 at 6:43 AM, Jens Lehmann wrote: > > Am 26.07.2017 um 23:06 schrieb Junio C Hamano: > >> > >> Stefan Beller

Re: [PATCH v4 4/4] submodule_needs_pushing() NEEDSWORK when we can not answer this question

2016-11-16 Thread Heiko Voigt
On Wed, Nov 16, 2016 at 11:18:07AM -0800, Junio C Hamano wrote: > Heiko Voigt <hvo...@hvoigt.net> writes: > > > Signed-off-by: Heiko Voigt <hvo...@hvoigt.net> > > --- > > Needs retitle ;-) Here is what I tentatively queued. Thanks ;-) Missed that one. >

[PATCH v4 3/4] batch check whether submodule needs pushing into one call

2016-11-16 Thread Heiko Voigt
We run a command for each sha1 change in a submodule. This is unnecessary since we can simply batch all sha1's we want to check into one command. Lets do it so we can speedup the check when many submodule changes are in need of checking. Signed-off-by: Heiko Voigt <hvo...@hvoigt.

[PATCH v4 2/4] serialize collection of refs that contain submodule changes

2016-11-16 Thread Heiko Voigt
We are iterating over each pushed ref and want to check whether it contains changes to submodules. Instead of immediately checking each ref lets first collect them and then do the check for all of them in one revision walk. Signed-off-by: Heiko Voigt <hvo...@hvoigt.net> --- submodule.

[PATCH v4 4/4] submodule_needs_pushing() NEEDSWORK when we can not answer this question

2016-11-16 Thread Heiko Voigt
Signed-off-by: Heiko Voigt <hvo...@hvoigt.net> --- submodule.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/submodule.c b/submodule.c index 11391fa..00dd655 100644 --- a/submodule.c +++ b/submodule.c @@ -531,6 +531,17 @@ static int submodule_has_commits(const char

[PATCH v4 1/4] serialize collection of changed submodules

2016-11-16 Thread Heiko Voigt
one command and only issued that instead of one call for each remote ref in the submodule. Signed-off-by: Heiko Voigt <hvo...@hvoigt.net> --- submodule.c | 59 +++ 1 file changed, 55 insertions(+), 4 deletions(-) diff --git a/submodu

[PATCH v4 0/4] Speedup finding of unpushed submodules

2016-11-16 Thread Heiko Voigt
You can find the third iteration of this series here: http://public-inbox.org/git/cover.1479221071.git.hvo...@hvoigt.net/ All comments from the last iteration should be addressed. Cheers Heiko Heiko Voigt (4): serialize collection of changed submodules serialize collection of refs

Re: [PATCH v1 2/2] travis-ci: disable GIT_TEST_HTTPD for macOS

2016-11-16 Thread Heiko Voigt
On Tue, Nov 15, 2016 at 10:31:59AM -0500, Jeff King wrote: > On Tue, Nov 15, 2016 at 01:07:18PM +0100, Heiko Voigt wrote: > > > On Fri, Nov 11, 2016 at 09:22:51AM +0100, Lars Schneider wrote: > > > To all macOS users on the list: > > > Does anyone execute the tes

Re: [PATCH v3 3/4] batch check whether submodule needs pushing into one call

2016-11-16 Thread Heiko Voigt
On Tue, Nov 15, 2016 at 02:28:31PM -0800, Stefan Beller wrote: > On Tue, Nov 15, 2016 at 6:56 AM, Heiko Voigt <hvo...@hvoigt.net> wrote: > > > -static int submodule_needs_pushing(const char *path, const unsigned char > > sha1[20]) > > +static int check_has_comm

Re: [PATCH v3 4/4] submodule_needs_pushing() NEEDSWORK when we can not answer this question

2016-11-16 Thread Heiko Voigt
On Tue, Nov 15, 2016 at 04:13:51PM -0800, Junio C Hamano wrote: > Stefan Beller writes: > > >> "We do not know" ... > > > > ... because there is no way to check for us as we don't have the > > submodule commits. > > > > " We do consider it safe as no one in their sane

Re: Git status takes too long- How to improve the performance of git

2016-11-15 Thread Heiko Voigt
On Tue, Nov 15, 2016 at 02:33:12AM -0700, ravalika wrote: > Number of files - 63883 Since you also posted this to the "Git for Windows" mailinglist I assume that you are using Windows. Reduce the number of files. For example split the repository into two one for documentation and one for source.

[PATCH v3 3/4] batch check whether submodule needs pushing into one call

2016-11-15 Thread Heiko Voigt
We run a command for each sha1 change in a submodule. This is unnecessary since we can simply batch all sha1's we want to check into one command. Lets do it so we can speedup the check when many submodule changes are in need of checking. Signed-off-by: Heiko Voigt <hvo...@hvoigt.

[PATCH v3 2/4] serialize collection of refs that contain submodule changes

2016-11-15 Thread Heiko Voigt
We are iterating over each pushed ref and want to check whether it contains changes to submodules. Instead of immediately checking each ref lets first collect them and then do the check for all of them in one revision walk. Signed-off-by: Heiko Voigt <hvo...@hvoigt.net> --- submodule.

[PATCH v3 4/4] submodule_needs_pushing() NEEDSWORK when we can not answer this question

2016-11-15 Thread Heiko Voigt
Signed-off-by: Heiko Voigt <hvo...@hvoigt.net> --- submodule.c | 8 1 file changed, 8 insertions(+) diff --git a/submodule.c b/submodule.c index e1196fd..29efee9 100644 --- a/submodule.c +++ b/submodule.c @@ -531,6 +531,14 @@ static int submodule_has_commits(const char *path,

[PATCH v3 1/4] serialize collection of changed submodules

2016-11-15 Thread Heiko Voigt
one command and only issued that instead of one call for each remote ref in the submodule. Signed-off-by: Heiko Voigt <hvo...@hvoigt.net> --- submodule.c | 60 1 file changed, 56 insertions(+), 4 deletions(-) diff --git a/submodu

[PATCH v3 0/4] Speedup finding of unpushed submodules

2016-11-15 Thread Heiko Voigt
against it we can just drop that patch. Cheers Heiko Heiko Voigt (4): serialize collection of changed submodules serialize collection of refs that contain submodule changes batch check whether submodule needs pushing into one call submodule_needs_pushing() NEEDSWORK when we can not answer

Re: [PATCH v1 2/2] travis-ci: disable GIT_TEST_HTTPD for macOS

2016-11-15 Thread Heiko Voigt
On Fri, Nov 11, 2016 at 09:22:51AM +0100, Lars Schneider wrote: > To all macOS users on the list: > Does anyone execute the tests with GIT_TEST_HTTPD enabled successfully? Nope. The following tests fail for me on master: 5539, 5540, 5541, 5542, 5550, 5551, 5561, 5812. Cheers Heiko

Re: Uninitialized submodules as symlinks

2016-10-17 Thread Heiko Voigt
On Fri, Oct 14, 2016 at 09:48:16AM -0700, Junio C Hamano wrote: > Kevin Daudt <m...@ikke.info> writes: > > > On Thu, Oct 13, 2016 at 06:10:17PM +0200, Heiko Voigt wrote: > >> On Fri, Oct 07, 2016 at 06:17:05PM +, David Turner wrote: > >> > Presently, un

Re: [PATCH v2 3/3] batch check whether submodule needs pushing into one call

2016-10-13 Thread Heiko Voigt
On Wed, Oct 12, 2016 at 10:37:33AM -0700, Junio C Hamano wrote: > Heiko Voigt <hvo...@hvoigt.net> writes: > > >> If we do not even have these commits locally, then there is no point > >> attempting to push, so returning 0 (i.e. it is not "needs

Re: Uninitialized submodules as symlinks

2016-10-13 Thread Heiko Voigt
On Fri, Oct 07, 2016 at 06:17:05PM +, David Turner wrote: > Presently, uninitialized submodules are materialized in the working > tree as empty directories. We would like to consider having them be > symlinks. Specifically, we'd like them to be symlinks into a FUSE > filesystem which

Re: [PATCH v2 1/3] serialize collection of changed submodules

2016-10-13 Thread Heiko Voigt
On Wed, Oct 12, 2016 at 10:18:28AM -0700, Junio C Hamano wrote: > Heiko Voigt <hvo...@hvoigt.net> writes: > > > Which seems quite extensively long for a static function so how about > > we shorten it a bit and add a comment: > > > > /* lookup or cre

Re: [PATCH v2 3/3] batch check whether submodule needs pushing into one call

2016-10-12 Thread Heiko Voigt
On Mon, Oct 10, 2016 at 03:56:13PM -0700, Junio C Hamano wrote: > Heiko Voigt <hvo...@hvoigt.net> writes: > > > -static int submodule_needs_pushing(const char *path, const unsigned char > > sha1[20]) > > +static int check_has_hash(const unsi

Re: [PATCH v2 1/3] serialize collection of changed submodules

2016-10-12 Thread Heiko Voigt
On Mon, Oct 10, 2016 at 03:43:13PM -0700, Junio C Hamano wrote: > Stefan Beller writes: > > >> +static struct sha1_array *get_sha1s_from_list(struct string_list > >> *submodules, > >> + const char *path) > > > > So this will take the stringlist `submodules` and

Re: [PATCH v2 2/3] serialize collection of refs that contain submodule changes

2016-10-12 Thread Heiko Voigt
On Fri, Oct 07, 2016 at 11:16:31AM -0700, Stefan Beller wrote: > > diff --git a/submodule.c b/submodule.c > > index 59c9d15905..5044afc2f8 100644 > > --- a/submodule.c > > +++ b/submodule.c > > @@ -522,6 +522,13 @@ static int has_remote(const char *refname, const > > struct object_id *oid, > >

Re: [PATCH v2 1/3] serialize collection of changed submodules

2016-10-12 Thread Heiko Voigt
On Fri, Oct 07, 2016 at 10:59:29AM -0700, Stefan Beller wrote: > On Fri, Oct 7, 2016 at 8:06 AM, Heiko Voigt <hvo...@hvoigt.net> wrote: > > +static void free_submodules_sha1s(struct string_list *submodules) > > +{ > > + int i; > > +

Re: [PATCH] clean up confusing suggestion for commit references

2016-10-11 Thread Heiko Voigt
On Mon, Oct 10, 2016 at 12:14:14PM -0700, Junio C Hamano wrote: > Jeff King writes: > > > On Mon, Oct 10, 2016 at 11:24:01AM -0700, Junio C Hamano wrote: > > > >> I no longer have preference either way myself, even though I was in > >> favor of no-quotes simply because I had an

Re: [PATCH 1/2] submodule add: extend force flag to add existing repos

2016-10-11 Thread Heiko Voigt
Hi, On Fri, Oct 07, 2016 at 10:25:04AM -0700, Stefan Beller wrote: > On Fri, Oct 7, 2016 at 5:52 AM, Heiko Voigt <hvo...@hvoigt.net> wrote: > > On Thu, Oct 06, 2016 at 01:11:20PM -0700, Junio C Hamano wrote: > >> Stefan Beller <sbel...@google.com> writes: > &

[PATCH v2 3/3] batch check whether submodule needs pushing into one call

2016-10-07 Thread Heiko Voigt
We run a command for each sha1 change in a submodule. This is unnecessary since we can simply batch all sha1's we want to check into one command. Lets do it so we can speedup the check when many submodule changes are in need of checking. Signed-off-by: Heiko Voigt <hvo...@hvoigt.

[PATCH v2 2/3] serialize collection of refs that contain submodule changes

2016-10-07 Thread Heiko Voigt
We are iterating over each pushed ref and want to check whether it contains changes to submodules. Instead of immediately checking each ref lets first collect them and then do the check for all of them in one revision walk. Signed-off-by: Heiko Voigt <hvo...@hvoigt.net> --- submodule.

[PATCH v2 1/3] serialize collection of changed submodules

2016-10-07 Thread Heiko Voigt
one command and only issued that instead of one call for each remote ref in the submodule. Signed-off-by: Heiko Voigt <hvo...@hvoigt.net> --- submodule.c | 63 - 1 file changed, 58 insertions(+), 5 deletions(-) diff --git a/submodu

[PATCH v2 0/3] Speedup finding of unpushed submodules

2016-10-07 Thread Heiko Voigt
ls? But we might want to have another look at performance with this patch included. Maybe it is actually useable with the last patch included which was not yet on pu. Cheers Heiko Heiko Voigt (3): serialize collection of changed submodules serialize collection of refs that contain submodule chang

Re: [PATCH 1/2] submodule add: extend force flag to add existing repos

2016-10-07 Thread Heiko Voigt
On Thu, Oct 06, 2016 at 01:11:20PM -0700, Junio C Hamano wrote: > Stefan Beller writes: > > > Currently the force flag in `git submodule add` takes care of possibly > > ignored files or when a name collision occurs. > > > > However there is another situation where submodule

Re: [PATCHv3 1/2] push: change submodule default to check when submodules exist

2016-10-07 Thread Heiko Voigt
On Thu, Oct 06, 2016 at 10:20:16AM -0700, Stefan Beller wrote: > On Thu, Oct 6, 2016 at 2:23 AM, Heiko Voigt <hvo...@hvoigt.net> wrote: > > On Wed, Oct 05, 2016 at 03:53:25PM +0200, Heiko Voigt wrote: > >> On Tue, Oct 04, 2016 at 02:03:58PM -0700, Stefan Beller wrote: &g

[PATCH] clean up confusing suggestion for commit references

2016-10-07 Thread Heiko Voigt
The description for referencing commits looks as if it is contradicting the example, since it is itself enclosed in double quotes. Lets use single quotes around the description and include the double quotes in the description so it matches the example. --- Sorry for opening this up again but I

Re: [PATCHv3 1/2] push: change submodule default to check when submodules exist

2016-10-06 Thread Heiko Voigt
On Wed, Oct 05, 2016 at 03:53:25PM +0200, Heiko Voigt wrote: > On Tue, Oct 04, 2016 at 02:03:58PM -0700, Stefan Beller wrote: > > Jeff, > > thanks for the suggestions, both git_path(..) as well as checking the > > config, > > this seems quite readable to me: > &

Re: Bug Report: "git submodule deinit" fails right after a clone

2016-10-06 Thread Heiko Voigt
Hi, please also keep the mailinglist in the CC so everyone can read this. On Thu, Oct 06, 2016 at 09:11:05AM +0200, Thomas Bétous wrote: > On Wed, Oct 5, 2016 at 3:36 PM, Heiko Voigt <hvo...@hvoigt.net> wrote: > > > > > My initial reaction is that this might be a proble

Re: Reference a submodule branch instead of a commit

2016-10-05 Thread Heiko Voigt
On Wed, Oct 05, 2016 at 09:13:53AM -0700, Junio C Hamano wrote: > Heiko Voigt <hvo...@hvoigt.net> writes: > > >> It IS a hack, but having this information in .git would > >> mean that it can be forced to be in machine readable form, unlike a > >

Re: Reference a submodule branch instead of a commit

2016-10-05 Thread Heiko Voigt
On Tue, Oct 04, 2016 at 12:01:13PM -0700, Junio C Hamano wrote: > Junio C Hamano writes: > > > Stefan Beller writes: > > > >> I wonder if we could make that convenient for users by not tracking > >> the submodule, > >> i.e. > >> * we have the information

Re: Bug Report: "git submodule deinit" fails right after a clone

2016-10-05 Thread Heiko Voigt
Hi, please do not top-post the conversation will otherwise get hard to follow. Thank you. On Tue, Oct 04, 2016 at 05:46:45PM +0200, Thomas Bétous wrote: > Thank you for your answer and sorry for the delay (I was on vacation...). > > I am using git 2.9.0.windows.1 (run on Windows 7 via git

Re: [PATCHv3 1/2] push: change submodule default to check when submodules exist

2016-10-05 Thread Heiko Voigt
On Tue, Oct 04, 2016 at 02:03:58PM -0700, Stefan Beller wrote: > Jeff, > thanks for the suggestions, both git_path(..) as well as checking the config, > this seems quite readable to me: When reading the discussion I thought the same: What about the "old-style" repositories. I like this one.

Re: Re: Slow pushes on 'pu' - even when up-to-date..

2016-10-04 Thread Heiko Voigt
On Tue, Oct 04, 2016 at 07:44:28AM -0400, Jeff King wrote: > > My idea of a solution goes like this: > > * collect all SHA1's of the remotes refs > > * check if we have them locally > > * if not we abort and tell the user to fetch them somehow into local > > refs or disable the check > >

Re: [RFC PATCH] clone: add clone.recursesubmodules config option

2016-10-04 Thread Heiko Voigt
On Mon, Oct 03, 2016 at 10:18:32AM -0700, Stefan Beller wrote: > On Mon, Oct 3, 2016 at 8:36 AM, Jeremy Morton wrote: > > Did this ever get anywhere? Can we recursively update submodules with "git > > pull" in the supermodule now? > > I think the idea is sound. I am

Re: Reference a submodule branch instead of a commit

2016-10-04 Thread Heiko Voigt
On Mon, Oct 03, 2016 at 12:00:45PM -0700, Junio C Hamano wrote: > Jeremy Morton writes: > > > At the moment, supermodules must reference a given commit in each of > > its submodules. If one is in control of a submodule and it changes on > > a regular basis, this can cause

Re: Slow pushes on 'pu' - even when up-to-date..

2016-10-04 Thread Heiko Voigt
Hi, On Mon, Oct 03, 2016 at 02:11:36PM -0700, Linus Torvalds wrote: > This seems to be because I'm now on 'pu' as of a day or two ago in > order to test the abbrev logic, but lookie here: > > time git ls-remote ra.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux > .. shows all the

Re: Homebrew and Git

2016-09-20 Thread Heiko Voigt
Hi, On Sun, Sep 18, 2016 at 05:50:28PM +0200, Jonas Thiel wrote: > A while ago I have described my problem with Homebrew at the following > GitHub channel > (https://github.com/Homebrew/homebrew-core/issues/2970). In the > meanwhile, I believe that I my problem with Homebrew is based on an >

Re: Re: Homebrew and Git

2016-09-20 Thread Heiko Voigt
On Tue, Sep 20, 2016 at 01:02:28PM +0200, Heiko Voigt wrote: > Hi, > > On Sun, Sep 18, 2016 at 05:50:28PM +0200, Jonas Thiel wrote: > > A while ago I have described my problem with Homebrew at the following > > GitHub channel > > (https://github.com/Homebre

Re: [PATCH 3/2] batch check whether submodule needs pushing into one call

2016-09-19 Thread Heiko Voigt
On Fri, Sep 16, 2016 at 11:13:09AM -0700, Junio C Hamano wrote: > Heiko Voigt <hvo...@hvoigt.net> writes: > > The most exact solution would be to use all actual remote refs available > > (not sure if we have them at this point in the process?) another > > soluti

Re: [PATCH 3/2] batch check whether submodule needs pushing into one call

2016-09-19 Thread Heiko Voigt
On Fri, Sep 16, 2016 at 10:59:37AM -0700, Junio C Hamano wrote: > Heiko Voigt <hvo...@hvoigt.net> writes: > > +static void check_has_hash(const unsigned char sha1[20], void *data) > > +{ > > + int *has_hash = (int *) data; > > + > >

Re: [PATCH 2/2] serialize collection of refs that contain submodule changes

2016-09-19 Thread Heiko Voigt
Hi, On Fri, Sep 16, 2016 at 10:47:46AM -0700, Junio C Hamano wrote: > One thing that makes me worried is how the ref cache layer interacts > with this. I see you first call push_unpushed_submodules() when > ON_DEMAND is set, which would result in pushes in submodule > repositories, updating

Re: [PATCH 1/2] serialize collection of changed submodules

2016-09-19 Thread Heiko Voigt
On Fri, Sep 16, 2016 at 10:27:04AM -0700, Junio C Hamano wrote: > Heiko Voigt <hvo...@hvoigt.net> writes: > > > +static struct sha1_array *get_sha1s_from_list(struct string_list > > *submodules, > > + const char *path) > > +{ > > + str

Re: [wishlist?] make submodule commands robust to having non-submodule Subprojects

2016-09-16 Thread Heiko Voigt
On Thu, Sep 15, 2016 at 11:27:54AM -0700, Junio C Hamano wrote: > Stefan Beller writes: > > So how about this fictional work flow: > > > > $ git init top > > $ cd top > > $ git commit --allow-empty -m 'initial in top' > > $ git init sub > >

  1   2   3   4   >