Re: [PATCH v3 1/3] git-submodule add: Add -r/--record option

2012-11-28 Thread W. Trevor King
On Wed, Nov 28, 2012 at 11:02:45AM -0800, Junio C Hamano wrote: W. Trevor King wk...@tremily.us writes: From: W. Trevor King wk...@tremily.us Signed-off-by: W. Trevor King wk...@tremily.us --- Documentation/git-submodule.txt | 3 ++- git-submodule.sh| 2 +- 2

Re: [PATCH v3 1/3] git-submodule add: Add -r/--record option

2012-11-28 Thread Junio C Hamano
W. Trevor King wk...@tremily.us writes: As the command takes other options whose names begin with 'r', I thought the longer term plan was to stop letting --rebase squat on short and sweet -r and leaving it undocumented (even though the short one was added by mistake) was meant to be the first

Re: Re: [PATCH v3 1/3] git-submodule add: Add -r/--record option

2012-11-23 Thread Heiko Voigt
On Tue, Nov 20, 2012 at 11:52:46AM -0800, Junio C Hamano wrote: W. Trevor King wk...@tremily.us writes: The superproject gitlink should only be updated after $ git submodule update --pull A plain $ git submodule update would still checkout the previously-recorded SHA, not

Re: Re: [PATCH v3 1/3] git-submodule add: Add -r/--record option

2012-11-23 Thread Heiko Voigt
On Tue, Nov 20, 2012 at 07:19:12AM -0500, W. Trevor King wrote: The benefit is that Ævar's $ git submodule foreach 'git checkout $(git config --file $toplevel/.gitmodules submodule.$name.branch) git pull' becomes $ git submodule update --pull There is an important question still

Re: Re: [PATCH v3 1/3] git-submodule add: Add -r/--record option

2012-11-23 Thread W. Trevor King
On Fri, Nov 23, 2012 at 04:55:21PM +0100, Heiko Voigt wrote: On Tue, Nov 20, 2012 at 11:52:46AM -0800, Junio C Hamano wrote: W. Trevor King wk...@tremily.us writes: The superproject gitlink should only be updated after $ git submodule update --pull A plain $ git

Re: Re: [PATCH v3 1/3] git-submodule add: Add -r/--record option

2012-11-23 Thread W. Trevor King
On Fri, Nov 23, 2012 at 11:23:29AM -0500, W. Trevor King wrote: On Fri, Nov 23, 2012 at 05:03:01PM +0100, Heiko Voigt wrote: There is an important question still unanswered here for me: How does the submodule get the configuration what the local branch tracks on the remote side? A good

Re: [PATCH v3 1/3] git-submodule add: Add -r/--record option

2012-11-23 Thread Sascha Cunz
Am Freitag, 23. November 2012, 16:55:21 schrieb Heiko Voigt: I am still a little bit undecided about an automatically crafted commit. At $dayjob we sometimes update submodules to their tip without any superproject changes just to make sure we use the newest version. Most of the time the

Re: Re: [PATCH v3 1/3] git-submodule add: Add -r/--record option

2012-11-23 Thread W. Trevor King
On Fri, Nov 23, 2012 at 11:23:29AM -0500, W. Trevor King wrote: On Fri, Nov 23, 2012 at 04:55:21PM +0100, Heiko Voigt wrote: On Tue, Nov 20, 2012 at 11:52:46AM -0800, Junio C Hamano wrote: W. Trevor King wk...@tremily.us writes: The superproject gitlink should only be updated after

Re: [PATCH v3 1/3] git-submodule add: Add -r/--record option

2012-11-20 Thread W. Trevor King
On Mon, Nov 19, 2012 at 09:39:34PM -0800, Junio C Hamano wrote: W. Trevor King wk...@tremily.us writes: On Mon, Nov 19, 2012 at 04:49:09PM -0800, Junio C Hamano wrote: W. Trevor King wk...@tremily.us writes: ... I think it's best to have users craft their own commit messages

Re: [PATCH v3 1/3] git-submodule add: Add -r/--record option

2012-11-19 Thread Junio C Hamano
W. Trevor King wk...@tremily.us writes: From what I have heard of projects using this: They usually still have something that records the SHA1s on a regular basis. Thinking further, why not record them in git? We could add an option to update which creates such a commit. I think it's best

Re: [PATCH v3 1/3] git-submodule add: Add -r/--record option

2012-11-19 Thread W. Trevor King
On Mon, Nov 19, 2012 at 04:49:09PM -0800, Junio C Hamano wrote: W. Trevor King wk...@tremily.us writes: From what I have heard of projects using this: They usually still have something that records the SHA1s on a regular basis. Thinking further, why not record them in git? We could add an

Re: [PATCH v3 1/3] git-submodule add: Add -r/--record option

2012-11-19 Thread Junio C Hamano
W. Trevor King wk...@tremily.us writes: On Mon, Nov 19, 2012 at 04:49:09PM -0800, Junio C Hamano wrote: W. Trevor King wk...@tremily.us writes: ... I think it's best to have users craft their own commit messages explaining why the branch was updated. That said, an auto-generated hint (a

Re: Re: [PATCH v3 1/3] git-submodule add: Add -r/--record option

2012-11-17 Thread Heiko Voigt
Hi, sorry for the late reply but my git time is limited. On Sat, Nov 10, 2012 at 02:02:32PM -0500, W. Trevor King wrote: On Fri, Nov 09, 2012 at 05:29:27PM +0100, Heiko Voigt wrote: I think we should agree on a behavior for this option and implement it the same time when add learns about

Re: Re: [PATCH v3 1/3] git-submodule add: Add -r/--record option

2012-11-17 Thread Heiko Voigt
Hi, On Sun, Nov 11, 2012 at 10:00:48AM -0500, W. Trevor King wrote: On Sun, Nov 11, 2012 at 02:33:45AM -0800, Junio C Hamano wrote: In order to avoid losing (or creating) local-only submodule commits, I'll probably bail (with an error) on non-fast-forward pulls. Can anyone else think of

Re: Re: [PATCH v3 1/3] git-submodule add: Add -r/--record option

2012-11-17 Thread W. Trevor King
On Sat, Nov 17, 2012 at 04:04:42PM +0100, Heiko Voigt wrote: On Sat, Nov 10, 2012 at 01:44:37PM -0500, W. Trevor King wrote: $ git submodule pull-branch I think floating submodules is a misleading name for this feature though, since the checkout SHA is explicitly specified. We're

Re: Re: Re: [PATCH v3 1/3] git-submodule add: Add -r/--record option

2012-11-17 Thread Heiko Voigt
On Sat, Nov 17, 2012 at 02:20:27PM -0500, W. Trevor King wrote: On Sat, Nov 17, 2012 at 04:30:07PM +0100, Heiko Voigt wrote: (2) git diff [$path] and friends in the superproject compares the HEAD of thecheckout of the submodule at $path with the tip of the branch named by

Re: Re: Re: [PATCH v3 1/3] git-submodule add: Add -r/--record option

2012-11-17 Thread W. Trevor King
On Sat, Nov 17, 2012 at 10:31:30PM +0100, Heiko Voigt wrote: On Sat, Nov 17, 2012 at 02:20:27PM -0500, W. Trevor King wrote: On Sat, Nov 17, 2012 at 04:30:07PM +0100, Heiko Voigt wrote: (2) git diff [$path] and friends in the superproject compares the HEAD of thecheckout of the

Re: [PATCH v3 1/3] git-submodule add: Add -r/--record option

2012-11-11 Thread Junio C Hamano
W. Trevor King wk...@tremily.us writes: On Thu, Nov 08, 2012 at 11:34:54PM -0800, Junio C Hamano wrote: I would not object to git config submodule.$name.branch $value, on the other hand. git config can be used to set a piece of data that has specific meaning, but as a low-level tool, it is

Re: [PATCH v3 1/3] git-submodule add: Add -r/--record option

2012-11-10 Thread W. Trevor King
On Thu, Nov 08, 2012 at 11:34:54PM -0800, Junio C Hamano wrote: W. Trevor King wk...@tremily.us writes: By remaining agnostic on the variable usage, this patch makes submodule setup more convenient for all parties. I personally do not think remaining agnostic on the usage is a good

Re: [PATCH v3 1/3] git-submodule add: Add -r/--record option

2012-11-09 Thread Heiko Voigt
Hi, On Thu, Nov 08, 2012 at 11:34:54PM -0800, Junio C Hamano wrote: W. Trevor King wk...@tremily.us writes: By remaining agnostic on the variable usage, this patch makes submodule setup more convenient for all parties. I personally do not think remaining agnostic on the usage is a good

[PATCH v3 1/3] git-submodule add: Add -r/--record option

2012-11-08 Thread W. Trevor King
From: W. Trevor King wk...@tremily.us This option allows you to record a submodule.name.branch option in .gitmodules. Git does not currently use this configuration option for anything, but users have used it for several things, so it makes sense to add some syntactic sugar for initializing the

Re: [PATCH v3 1/3] git-submodule add: Add -r/--record option

2012-11-08 Thread Junio C Hamano
W. Trevor King wk...@tremily.us writes: By remaining agnostic on the variable usage, this patch makes submodule setup more convenient for all parties. I personally do not think remaining agnostic on the usage is a good thing, at least for any option to commands at the higher level on the