Re: [PATCH, RFC] checkout: Attempt to checkout submodules

2015-03-25 Thread Jens Lehmann
Am 24.03.2015 um 19:30 schrieb Trevor Saunders: On Mon, Mar 23, 2015 at 09:01:48PM +0100, Jens Lehmann wrote: Using -f here is ok when you extend the appropriate verify functions in unpack-trees.c to check that no modifications will be lost (unless the original checkout is used with -f). See

Re: [PATCH, RFC] checkout: Attempt to checkout submodules

2015-03-24 Thread Trevor Saunders
On Mon, Mar 23, 2015 at 09:01:48PM +0100, Jens Lehmann wrote: Am 20.03.2015 um 01:13 schrieb Trevor Saunders: On Thu, Mar 19, 2015 at 02:15:19PM -0700, Junio C Hamano wrote: Trevor Saunders tbsau...@tbsaunde.org writes: I have a feeling that an optional feature that allows git submodule

Re: [PATCH, RFC] checkout: Attempt to checkout submodules

2015-03-23 Thread Jens Lehmann
Am 20.03.2015 um 01:13 schrieb Trevor Saunders: On Thu, Mar 19, 2015 at 02:15:19PM -0700, Junio C Hamano wrote: Trevor Saunders tbsau...@tbsaunde.org writes: I have a feeling that an optional feature that allows git submodule update to happen automatically from this codepath might be acceptable

Re: [PATCH, RFC] checkout: Attempt to checkout submodules

2015-03-19 Thread Trevor Saunders
On Thu, Mar 19, 2015 at 02:15:19PM -0700, Junio C Hamano wrote: Trevor Saunders tbsau...@tbsaunde.org writes: On one hand it seems kind of user hostile to just toss out any changes in the submodule that are uncommitted, on the other for any other path it would seem weird to have git

Re: [PATCH, RFC] checkout: Attempt to checkout submodules

2015-03-19 Thread Junio C Hamano
Trevor Saunders tbsau...@tbsaunde.org writes: If a user does git checkout HEAD -- path/to/submodule they'd expect the submodule to be checked out to the commit that submodule is at in HEAD. Hmmm. Is it a good idea to do that unconditionally by hard-coding the behaviour like this patch does?

Re: [PATCH, RFC] checkout: Attempt to checkout submodules

2015-03-19 Thread Trevor Saunders
On Thu, Mar 19, 2015 at 11:53:10AM -0700, Junio C Hamano wrote: Trevor Saunders tbsau...@tbsaunde.org writes: If a user does git checkout HEAD -- path/to/submodule they'd expect the submodule to be checked out to the commit that submodule is at in HEAD. Hmmm. Is it a good idea to do

[PATCH, RFC] checkout: Attempt to checkout submodules

2015-03-18 Thread Trevor Saunders
If a user does git checkout HEAD -- path/to/submodule they'd expect the submodule to be checked out to the commit that submodule is at in HEAD. This is the most brute force possible way of try to do that, and so its probably broken in some cases. However I'm not terribly familiar with git's