Re: [RFC] remove/deprecate 'submodule init' and 'sync'

2012-12-03 Thread W. Trevor King
On Sun, Dec 02, 2012 at 04:11:59PM -0500, W. Trevor King wrote: > On Sun, Dec 02, 2012 at 09:29:29PM +0100, Jens Lehmann wrote: > > Am 01.12.2012 18:49, schrieb W. Trevor King: > > > On Sat, Dec 01, 2012 at 06:25:17PM +0100, Jens Lehmann wrote: > > >> What real world problems do we have with the cu

Re: [RFC] remove/deprecate 'submodule init' and 'sync'

2012-12-02 Thread W. Trevor King
From: "W. Trevor King" To: Jens Lehmann , Junio C Hamano Cc: Phil Hord , Git , Heiko Voigt , Jeff King , Shawn Pearce , Nahor Bcc: Subject: Re: [RFC] remove/deprecate 'submodule init' and 'sync' Reply-To: In-Reply-To: <50bbba29.2000...@

Re: [RFC] remove/deprecate 'submodule init' and 'sync'

2012-12-02 Thread Jens Lehmann
Am 02.12.2012 20:09, schrieb W. Trevor King: > Before I get into the details, I'd like to point out that I actually > understand the purpose of `submodule init` now ;). To avoid further > confusion, my current one-line command summaries would be: > > init: mark a submodule as active for futur

Re: [RFC] remove/deprecate 'submodule init' and 'sync'

2012-12-02 Thread W. Trevor King
Before I get into the details, I'd like to point out that I actually understand the purpose of `submodule init` now ;). To avoid further confusion, my current one-line command summaries would be: init: mark a submodule as active for future submodule operation deinit: mark a submodule as ina

Re: [RFC] remove/deprecate 'submodule init' and 'sync'

2012-12-01 Thread W. Trevor King
On Sat, Dec 01, 2012 at 07:04:05PM +0100, Jens Lehmann wrote: > Am 01.12.2012 18:49, schrieb W. Trevor King: > > I think removing `init` will cause some compatibility issues anyway, > > so I was re-imaging how you do it. I don't think update='none' and > > "don't populate my submodule" are distinc

Re: [RFC] remove/deprecate 'submodule init' and 'sync'

2012-12-01 Thread Jens Lehmann
Am 01.12.2012 18:49, schrieb W. Trevor King: > I think removing `init` will cause some compatibility issues anyway, > so I was re-imaging how you do it. I don't think update='none' and > "don't populate my submodule" are distinct ideas, while a locally > configured url="somwhere" and "please popul

Re: [RFC] remove/deprecate 'submodule init' and 'sync'

2012-12-01 Thread W. Trevor King
On Sat, Dec 01, 2012 at 06:25:17PM +0100, Jens Lehmann wrote: > Am 01.12.2012 17:30, schrieb W. Trevor King: > > On Sat, Dec 01, 2012 at 04:38:02PM +0100, Jens Lehmann wrote: > > > 1) It tells the submodule commands that the user wants to have > > > that submodule populated (which is done in a subs

Re: [RFC] remove/deprecate 'submodule init' and 'sync'

2012-12-01 Thread Jens Lehmann
Am 01.12.2012 17:30, schrieb W. Trevor King: > On Sat, Dec 01, 2012 at 04:38:02PM +0100, Jens Lehmann wrote: >> You need to handle the 'url' setting differently. While I think the 'update' >> setting should not be copied into .git/config at all (because it makes it >> impossible for upstream to c

Re: [RFC] remove/deprecate 'submodule init' and 'sync'

2012-12-01 Thread W. Trevor King
I'm currently stuck with adding a commit-less existing repository as a submodule (which happens in t7400-submodule-basic.sh, ../bar/a/b/c works with relative local path): $ mkdir -p super/sub $ cd super $ git init $ (cd sub && git init) $ git submodule add ./ sub $ git status # On br

Re: [RFC] remove/deprecate 'submodule init' and 'sync'

2012-12-01 Thread W. Trevor King
On Sat, Dec 01, 2012 at 04:56:02PM +0100, Jens Lehmann wrote: > Am 01.12.2012 00:52, schrieb Phil Hord: > > If I never 'submodule init' a submodule, it does not get visited by > > 'git submodule foreach', among others. I think some people use this > > behavior explicitly. > > > > On the other han

Re: [RFC] remove/deprecate 'submodule init' and 'sync'

2012-12-01 Thread W. Trevor King
On Sat, Dec 01, 2012 at 04:38:02PM +0100, Jens Lehmann wrote: > Am 30.11.2012 18:53, schrieb W. Trevor King: > > In my v5 patch, I check for submodule..remote first in the usual > > `git config` files. If I don't find what I'm looking for I fall back > > on .gitmodules (basically Jens' suggestion)

Re: [RFC] remove/deprecate 'submodule init' and 'sync'

2012-12-01 Thread Jens Lehmann
Am 01.12.2012 00:52, schrieb Phil Hord: > If I never 'submodule init' a submodule, it does not get visited by > 'git submodule foreach', among others. I think some people use this > behavior explicitly. > > On the other hand, I've also notice that a submodule which I have > removed does not get d

Re: [RFC] remove/deprecate 'submodule init' and 'sync'

2012-12-01 Thread Jens Lehmann
Am 01.12.2012 13:48, schrieb W. Trevor King: > On Fri, Nov 30, 2012 at 06:52:22PM -0500, Phil Hord wrote: >> If I never 'submodule init' a submodule, it does not get visited by 'git >> submodule foreach', among others. I think some people use this behavior >> explicitly. > > This is something I

Re: [RFC] remove/deprecate 'submodule init' and 'sync'

2012-12-01 Thread Jens Lehmann
Am 30.11.2012 18:53, schrieb W. Trevor King: > In my v5 patch, I check for submodule..remote first in the usual > `git config` files. If I don't find what I'm looking for I fall back > on .gitmodules (basically Jens' suggestion). However, my initial > copying-to-.git/config approach was mostly do

Re: [RFC] remove/deprecate 'submodule init' and 'sync'

2012-12-01 Thread W. Trevor King
On Fri, Nov 30, 2012 at 06:52:22PM -0500, Phil Hord wrote: > If I never 'submodule init' a submodule, it does not get visited by > 'git submodule foreach', among others. I think some people use this > behavior explicitly. This is something I'll fix while working up a trial patch. Currently cmd_u

Re: [RFC] remove/deprecate 'submodule init' and 'sync'

2012-11-30 Thread Phil Hord
On Fri, Nov 30, 2012 at 12:53 PM, W. Trevor King wrote: > On Wed, Nov 28, 2012 at 12:19:04AM +0100, Jens Lehmann wrote: >> Am 26.11.2012 22:00, schrieb W. Trevor King: >> > From: "W. Trevor King" >> > >> > This allows users to override the .gitmodules value with a >> > per-repository value. >> >>

Re: [RFC] remove/deprecate 'submodule init' and 'sync'

2012-11-30 Thread W. Trevor King
On Fri, Nov 30, 2012 at 12:53:09PM -0500, W. Trevor King wrote: > Likewise for `submodule sync`, which seems to be > quite similar to `init`. Ah, I'd remove the part of `sync` that touches the superproject's .git/config, but keep the part that stores the superproject-reorded URL in the submodule's