From: Bert Wesarg Date: Tue, 07 Jun 2011 19:12:09 GMT Subject: Re: [PATCH 2/4] Add infrastructure for ref namespaces Message-ID: In-Reply-To: <1307470885-4018-3-git-send-email-jamey@minilop.net> On Tue, Jun 7, 2011 at 20:21, Jamey Sharp wrote: > diff --git a/git.c b/git.c > index 89721d4..98cbf7b 100644 > --- a/git.c > +++ b/git.c > @@ -126,6 +126,20 @@ static int handle_options(const char ***argv, int *argc, int *envchanged) >                        setenv(GIT_DIR_ENVIRONMENT, cmd + 10, 1); >                        if (envchanged) >                                *envchanged = 1; > +               } else if (!strcmp(cmd, "--namespace")) { > +                       if (*argc < 2) { > +                               fprintf(stderr, "No directory given for --namespace.\n" ); This 'directory' is probably misnamed here. Bert > +                               usage(git_usage_string); > +                       } > +                       setenv(GIT_NAMESPACE_ENVIRONMENT, (*argv)[1], 1); > +                       if (envchanged) > +                               *envchanged = 1; > +                       (*argv)++; > +                       (*argc)--; > +               } else if (!prefixcmp(cmd, "--namespace=")) { > +                       setenv(GIT_NAMESPACE_ENVIRONMENT, cmd + 12, 1); > +                       if (envchanged) > +                               *envchanged = 1; >                } else if (!strcmp(cmd, "--work-tree")) { >                        if (*argc < 2) { >                                fprintf(stderr, "No directory given for --work-tree.\n" );