[PATCH 12/15] unpack-trees: check if we can perform the operation for submodules

2017-02-23 Thread Stefan Beller
Signed-off-by: Stefan Beller --- unpack-trees.c | 131 + unpack-trees.h | 1 + 2 files changed, 123 insertions(+), 9 deletions(-) diff --git a/unpack-trees.c b/unpack-trees.c index 616a0ae4b2..8333da2cc9 100644 --- a/unpack-trees.c +++ b/

Re: [PATCH 12/15] unpack-trees: check if we can perform the operation for submodules

2017-02-21 Thread Jacob Keller
On Tue, Feb 21, 2017 at 3:44 PM, Stefan Beller wrote: > On Tue, Feb 21, 2017 at 3:35 PM, Jacob Keller wrote: >> On Tue, Feb 21, 2017 at 2:16 PM, Stefan Beller wrote: >>> On Fri, Feb 17, 2017 at 10:42 AM, Jacob Keller >>> wrote: On Wed, Feb 15, 2017 at 4:38 PM, Stefan Beller wrote: >

Re: [PATCH 12/15] unpack-trees: check if we can perform the operation for submodules

2017-02-21 Thread Stefan Beller
On Tue, Feb 21, 2017 at 3:35 PM, Jacob Keller wrote: > On Tue, Feb 21, 2017 at 2:16 PM, Stefan Beller wrote: >> On Fri, Feb 17, 2017 at 10:42 AM, Jacob Keller >> wrote: >>> On Wed, Feb 15, 2017 at 4:38 PM, Stefan Beller wrote: + if (is_active_submodule_with_strategy(ce, SM_UPDATE_UN

Re: [PATCH 12/15] unpack-trees: check if we can perform the operation for submodules

2017-02-21 Thread Jacob Keller
On Tue, Feb 21, 2017 at 2:16 PM, Stefan Beller wrote: > On Fri, Feb 17, 2017 at 10:42 AM, Jacob Keller wrote: >> On Wed, Feb 15, 2017 at 4:38 PM, Stefan Beller wrote: >>> + if (is_active_submodule_with_strategy(ce, SM_UPDATE_UNSPECIFIED)) >> >> Here, and in other cases where we use >> is_a

Re: [PATCH 12/15] unpack-trees: check if we can perform the operation for submodules

2017-02-21 Thread Stefan Beller
On Fri, Feb 17, 2017 at 10:42 AM, Jacob Keller wrote: > On Wed, Feb 15, 2017 at 4:38 PM, Stefan Beller wrote: >> + if (is_active_submodule_with_strategy(ce, SM_UPDATE_UNSPECIFIED)) > > Here, and in other cases where we use > is_active_submodule_with_strategy(), why do we only ever check > S

Re: [PATCH 12/15] unpack-trees: check if we can perform the operation for submodules

2017-02-17 Thread Jacob Keller
On Wed, Feb 15, 2017 at 4:38 PM, Stefan Beller wrote: > + if (is_active_submodule_with_strategy(ce, SM_UPDATE_UNSPECIFIED)) Here, and in other cases where we use is_active_submodule_with_strategy(), why do we only ever check SM_UPDATE_UNSPECIFIED? It seems really weird that we're only going

Re: [PATCH 12/15] unpack-trees: check if we can perform the operation for submodules

2017-02-16 Thread Junio C Hamano
Stefan Beller writes: > + > + /* ERROR_WOULD_LOSE_UNTRACKED_SUBMODULE */ > + "Submodule '%s' cannot be deleted as it contains untracked files.", OK. > + msgs[ERROR_WOULD_LOSE_UNTRACKED_SUBMODULE] = > + _("Submodule '%s' cannot be deleted as it contains untracked > files

Re: [PATCH 12/15] unpack-trees: check if we can perform the operation for submodules

2017-02-16 Thread Brandon Williams
On 02/15, Stefan Beller wrote: > +static void reload_gitmodules_file(struct index_state *index, > +struct checkout *state) > +{ > + int i; > + for (i = 0; i < index->cache_nr; i++) { > + struct cache_entry *ce = index->cache[i]; > + if

[PATCH 12/15] unpack-trees: check if we can perform the operation for submodules

2017-02-15 Thread Stefan Beller
Signed-off-by: Stefan Beller --- unpack-trees.c | 98 -- unpack-trees.h | 1 + 2 files changed, 90 insertions(+), 9 deletions(-) diff --git a/unpack-trees.c b/unpack-trees.c index 616a0ae4b2..40af8e9b5f 100644 --- a/unpack-trees.c +++ b/un