[PATCH 1/4] git-gui: provide question helper for retry fallback on Windows

2019-09-26 Thread Heiko Voigt via GitGitGadget
From: Heiko Voigt Make use of the new environment variable GIT_ASK_YESNO to support the recently implemented fallback in case unlink, rename or rmdir fail for files in use on Windows. The added dialog will present a yes/no question to the the user which will currently be used by the windows

Re: [PATCH] gitk: fix --all behavior combined with --not

2019-07-11 Thread Heiko Voigt
On Wed, Jul 10, 2019 at 11:40:50AM -0700, Junio C Hamano wrote: > Heiko Voigt writes: > > > behavior. How about '--all-include-head'. Then e.g. > > > > git rev-parse --all-include-head --all --not origin/master > > > > would include the head re

Re: [PATCH] gitk: fix --all behavior combined with --not

2019-07-10 Thread Heiko Voigt
On Mon, Jul 08, 2019 at 10:16:50PM -0700, Junio C Hamano wrote: > Junio C Hamano writes: > > > The "--all" in rev-list family (including "git log") unconditionally > > include HEAD. The glitch here is that "--all" in rev-parse does > > not. And 4d5e1b1319 was an attempt to "fix" that, i.e. make

Re: [PATCH] gitk: fix --all behavior combined with --not

2019-07-10 Thread Heiko Voigt
On Mon, Jul 08, 2019 at 09:55:00PM -0700, Junio C Hamano wrote: > Junio C Hamano writes: > > > Heiko Voigt writes: > > > >> In commit 4d5e1b1319 ("gitk: Show detached HEAD if --all is specified", > >> 2014-09-09) the intention was to have detac

Re: [PATCH] gitk: fix --all behavior combined with --not

2019-07-04 Thread Heiko Voigt
Hi Dscho, On Thu, Jul 04, 2019 at 12:38:44PM +0200, Johannes Schindelin wrote: > On Thu, 4 Jul 2019, Heiko Voigt wrote: [...] > > Signed-off-by: Heiko Voigt > > Good description. Thanks. I am actually surprised that for almost 5 years nobody noticed this. It seems either nobody

[PATCH] gitk: fix --all behavior combined with --not

2019-07-04 Thread Heiko Voigt
gitk --all ^origin/master which it should. Signed-off-by: Heiko Voigt --- gitk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitk b/gitk index a14d7a1..19d95cd 100755 --- a/gitk +++ b/gitk @@ -295,7 +295,7 @@ proc parseviewrevs {view revs} { if {$revs eq {}} {

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 (e

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. H

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
pt the cache 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 a

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 tracke

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 encounter.

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 V4] config: add --expiry-date

2017-11-30 Thread Heiko Voigt
On Mon, Nov 20, 2017 at 03:37:03PM -0500, Jeff King wrote: > On Mon, Nov 20, 2017 at 12:28:11PM -0800, Stefan Beller wrote: > > > > +cc Stefan, who added the die(). It may be that we don't care that much > > > these days about recovering from broken .gitmodules files. > > > > By that you mean com

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 writes: > > > 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 `tre

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 recursing. > > > > But we did no

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 sub

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 writes: > > > On 10/16, Heiko Voigt wrote: > >> To make extending this logic later easier. > > > > This makes things so much clearer, thanks! > > I agree that it is clear to

[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 --- 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 --- submodule.c | 74 ++--- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/submodule.c b/submodule.c index 71d1773e2e..82d206eb65 100644 --- a

[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 --- t/t5526-fetch-submodules.sh | 42 +- 1 file change

[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. > > > > However other users of g

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 add"

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 wrote: > > NOTE: The argument in this message is not correct, see description in > > cover letter. > > > > The setup of the repositories in this test is

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 fileglob

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

2017-10-06 Thread Heiko Voigt
. In other words: We now require a name for a submodule repository. Signed-off-by: Heiko Voigt --- No changes from the previous version here. submodule.c | 91 + t/t5526-fetch-submodules.sh | 35 + 2 files changed, 85

[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 --- This should also be the same as in the previous version. submodule.c | 74 ++--- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/submodule.c b

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

2017-10-06 Thread Heiko Voigt
ar to one we could expect on a users setup. Signed-off-by: Heiko Voigt --- 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-submodule-push.sh

[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 --- t/t5526-fetch-submodules.sh | 42 +- 1 file change

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

2017-10-06 Thread Heiko Voigt
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 now?

[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 --- submodule.c | 74 ++--- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/submodule.c b/submodule.c index 38b9905e43..fa44fc59f2 100644 --- a

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

2017-09-15 Thread Heiko Voigt
ned-off-by: Heiko Voigt --- 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.hvoigt.net/ s

[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 --- 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 submodules in this test

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, which is not a valid >

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 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 wrote: > >> > On Fri, Aug 18, 2

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 writes: > > > So I think it is important that there are commits in the submodule so > > its history makes sense independently for others. > > I was trying to push the "just like trees&qu

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 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 (well, at > >> least a

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 formating

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. > > > > Reported-by: Lars Schneider > > Signed-off-by: Stef

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 r

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 wrote: > > When using git-mv with a submodule it will detect that and update the > > paths for its configurations (.gitmodules, worktree and gitfile). This > > doe

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 wrote: > > We store the changed submodules paths to calculate which submodule needs > > fetching. This does not work for moved submodules since their paths do > >

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 wrote: > > > To make extending this logic later easier. > > > > > > Signed-off-by: Heiko Voigt > > > --

[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 --- I am quite sure I replicated the same logic but a few more eyes would be appreciated. Cheers Heiko submodule.c | 55 +++ 1 file changed, 27 insertions(+), 28 deletions

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

2017-08-17 Thread Heiko Voigt
. In other 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 --- I updated the leftover code from my series implementing recursive fetch for moved submodules[1] to the curr

[PATCH] t5526: fix some broken && chains

2017-08-17 Thread Heiko Voigt
Signed-off-by: Heiko Voigt --- 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-fetch-submodules.sh

[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 --- 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_success 'moving a subm

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 (!subm

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 instead of a submodule n

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 "reposi

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 writes: > >> > >>> Rereading the archives, ther

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 writes: > > > Signed-off-by: Heiko Voigt > > --- > > Needs retitle ;-) Here is what I tentatively queued. Thanks ;-) Missed that one. > submodule_needs_pushing(): explain the beha

[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 --- submodule.c

[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 --- submodule.c | 35

[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 --- 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 *path, struct sha1_array

[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 --- submodule.c | 59 +++ 1 file changed, 55 insertions(+), 4 deletions(-) diff --git a/submodule.c b/submodule.c index

[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 that

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 wrote: > > > -static int submodule_needs_pushing(const char *path, const unsigned char > > sha1[20]) > > +static int check_has_commit(const unsigned c

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 mind would > > have

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. T

[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 --- submodule.c

[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 --- submodule.c | 35

[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 --- 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, struct sha1_array *commits

[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 --- submodule.c | 60 1 file changed, 56 insertions(+), 4 deletions(-) diff --git a/submodule.c b/submodule.c index

[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 this

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 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, uninitialized submodule

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 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 pushing" > >> situation) i

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 retrieve

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 writes: > > > Which seems quite extensively long for a static function so how about > > we shorten it a bit and add a comment: > > > > /* lookup or create co

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 writes: > > > -static int submodule_needs_pushing(const char *path, const unsigned char > > sha1[20]) > > +static int check_has_hash(const unsigned char sha1[20], void *data) > > { >

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 insert the path into

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 wrote: > > +static void free_submodules_sha1s(struct string_list *submodules) > > +{ > > + int i; > > + for (i = 0; i < submodules->nr;

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 alias to produce t

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 wrote: > > On Thu, Oct 06, 2016 at 01:11:20PM -0700, Junio C Hamano wrote: > >> Stefan Beller writes: > >> > >> > Currently the force fl

[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 --- submodule.c

[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 --- submodule.c | 36

[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 --- submodule.c | 63 - 1 file changed, 58 insertions(+), 5 deletions(-) diff --git a/submodule.c b/submodule.c index

[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 add comes in handy: >

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 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: > >> > Jeff, >

[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 just

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 wrote: > > > > > My initial reaction is that this might be a problem with line endings. Did

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 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 > >> mention in README. I do not k

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 in the .gitmodules file > >> * the path i

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 bash).

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. Checki

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 confused there is nothing ha

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 a lot of overhead with

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 bran

  1   2   3   4   >