git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/2] git-completion.bash: prevent 'git help' from searching for git repository

From
Gerrit Pape <pape@smarden.org>
Date
Sep 4, 2009, 11:09 UTC
Message-ID
<20090904110936.6663.qmail@046e1bfbf7e41d.315fe32.mid.smarden.org>
In-Reply-To
<alpine.DEB.1.00.0909041217370.4605@intel-tinevez-2-302>
On Fri, Sep 04, 2009 at 12:22:36PM +0200, Johannes Schindelin wrote:
> -- snipsnap --
> [PATCH] git help -a: do not look for a repository
Perfect, thanks.
Acked-by: Gerrit Pape <pape@smarden.org>
Show 35 quoted lines
> Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
> 
> ---
> 
>  builtin-help.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/builtin-help.c b/builtin-help.c
> index e1eba77..719aa23 100644
> --- a/builtin-help.c
> +++ b/builtin-help.c
> @@ -416,9 +416,6 @@ int cmd_help(int argc, const char **argv, const char *prefix)
>  	const char *alias;
>  	load_command_list("git-", &main_cmds, &other_cmds);
>  
> -	setup_git_directory_gently(&nongit);
> -	git_config(git_help_config, NULL);
> -
>  	argc = parse_options(argc, argv, prefix, builtin_help_options,
>  			builtin_help_usage, 0);
>  
> @@ -429,6 +426,9 @@ int cmd_help(int argc, const char **argv, const char *prefix)
>  		return 0;
>  	}
>  
> +	setup_git_directory_gently(&nongit);
> +	git_config(git_help_config, NULL);
> +
>  	if (!argv[0]) {
>  		printf("usage: %s\n\n", git_usage_string);
>  		list_common_cmds_help();
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 7 of 17 in “git-completion.bash: prevent 'git help' from searching for git repository”
  1. git-completion.bash: prevent 'git help' from searching for git repositoryGerrit Pape, Sep 2, 2009
  2. Sverre RabbelierSep 2, 2009
  3. 1/2 git: add new option --no-git-dirGerrit Pape, Sep 4, 2009
  4. 2/2 git-completion.bash: prevent 'git help' from searching for git repositoryGerrit Pape, Sep 4, 2009
  5. Junio C HamanoSep 4, 2009
  6. Johannes SchindelinSep 4, 2009
  7. Gerrit PapeSep 4, 2009
  8. Johannes SchindelinSep 4, 2009
  9. Gerrit PapeSep 4, 2009
  10. Johannes SchindelinSep 4, 2009
  11. Junio C HamanoSep 7, 2009
  12. Gerrit PapeOct 27, 2009
  13. Junio C HamanoOct 28, 2009
  14. help -a: do not unnecessarily look for a repositoryGerrit Pape, Oct 28, 2009
  15. Junio C HamanoOct 28, 2009
  16. Rogan DawesSep 4, 2009
  17. Johannes SchindelinSep 4, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.