Re: [PATCH 2/4] Add infrastructure for ref namespaces
On Tue, Jun 7, 2011 at 20:21, Jamey Sharp <jamey@minilop.net> wrote:
Show 11 quoted lines
> 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
Show 14 quoted lines
> + 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" );