Re: git submodules implementation question

2016-09-01 Thread Uma Srinivasan
>>> The final version needs to be accompanied with tests to show the >>> effect of this change for callers. A test would set up a top-level >>> and submodule, deliberately break submodule/.git/ repository and >>> show what breaks and how without this change. Agreed! The repo where the original p

Re: git submodules implementation question

2016-09-01 Thread Uma Srinivasan
Yes, this one line fix addresses my problem. So, what is the next step? Will someone submit a patch or should I? Please note that I've never submitted a patch before, but I don't mind learning how to. Thanks, Uma > --- a/submodule.c > +++ b/submodule.c > @@ -1160,4 +1160,5 @@ void prepare_submod

Re: git submodules implementation question

2016-08-31 Thread Uma Srinivasan
dex d9e197a..4f8b0c7 100644 --- a/submodule.h +++ b/submodule.h @@ -73,6 +73,6 @@ int parallel_submodules(void); * a submodule by clearing any repo-specific envirionment variables, but * retaining any config in the environment. */ -void prepare_submodule_repo_env(struct argv_array *out); +void pre

Re: git submodules implementation question

2016-08-31 Thread Uma Srinivasan
v(). I know what to pass from the is_submodule_modified() caller. I don't think it's all that obvious for the other callers. Thanks, Uma On Wed, Aug 31, 2016 at 11:44 AM, Junio C Hamano wrote: > Uma Srinivasan writes: > >> diff --git a/submodule.c b/submodule.c >> ind

Re: git submodules implementation question

2016-08-31 Thread Uma Srinivasan
GIT_DIR_ENVIRONMENT)) + argv_array_pushf(out, "%s=%s", GIT_DIR_ENVIRONMENT, +get_git_dir()); } + } Thanks, Uma On Wed, Aug 31, 2016 at 9:42 AM, Junio C Hamano wrote: > Uma Srinivasan writes: > >>> I might suggest to update prepare_submodul

Re: git submodules implementation question

2016-08-30 Thread Uma Srinivasan
On Tue, Aug 30, 2016 at 10:53 AM, Junio C Hamano wrote: > Uma Srinivasan writes: > >> I think the following fix is still needed to is_submodule_modified(): >> >> strbuf_addf(&buf, "%s/.git", path); >> git_dir = re

Re: git submodules implementation question

2016-08-30 Thread Uma Srinivasan
n, Aug 29, 2016 at 11:23 PM, Jacob Keller wrote: > On Mon, Aug 29, 2016 at 11:09 PM, Jacob Keller wrote: >> On Mon, Aug 29, 2016 at 5:12 PM, Uma Srinivasan >> wrote: >>> This is great! Thanks Jake. If you happen to have the patch ID it >>> would be helpful. >>&

Re: git submodules implementation question

2016-08-29 Thread Uma Srinivasan
This is great! Thanks Jake. If you happen to have the patch ID it would be helpful. Uma On Mon, Aug 29, 2016 at 5:02 PM, Jacob Keller wrote: > On Mon, Aug 29, 2016 at 4:15 PM, Junio C Hamano wrote: >> Uma Srinivasan writes: >>> This fixes my issue but what do you think? Is

Re: git submodules implementation question

2016-08-29 Thread Uma Srinivasan
Yes, is_git_directory() is much better. Thanks for the pointer. I will submit a patch unless I hear more suggestions from others. Uma On Mon, Aug 29, 2016 at 4:15 PM, Junio C Hamano wrote: > Uma Srinivasan writes: > >> On Mon, Aug 29, 2016 at 2:13 PM, Uma Srinivasan >>

Re: git submodules implementation question

2016-08-29 Thread Uma Srinivasan
### die("Corrupted .git dir in submodule %s", path); ###} git_dir = buf.buf; } This fixes my issue but what do you think? Is this the right way to fix it? Is there a better way? Thanks, Uma On Mon, Aug 29, 2016 at 2:

Re: git submodules implementation question

2016-08-29 Thread Uma Srinivasan
Ok that makes sense. Thanks much. Uma On Mon, Aug 29, 2016 at 2:09 PM, Junio C Hamano wrote: > On Mon, Aug 29, 2016 at 2:03 PM, Uma Srinivasan > wrote: >> On Mon, Aug 29, 2016 at 1:03 PM, Junio C Hamano wrote: >>> >>> A top-level superproject can have

Re: git submodules implementation question

2016-08-29 Thread Uma Srinivasan
at a sub-directory can be registered as a submodule only with the "git submodule add " command. In this case only a gitlink file is created within the sub-directory and not a .git subdirectory. Please correct me if I am wrong. Thanks again, Uma On Mon, Aug 29, 2016 at 1:03 PM, Junio C Hama

git submodules implementation question

2016-08-28 Thread Uma Srinivasan
Hi, I am new to git source and internal development. Recently I've been looking at a problem where issuing "git status" in a corrupted workspace handed over to me by a user, forks several thousand child processes recursively. The symptoms of the corrupted workspace to reproduce this problem are a