From: Junio C Hamano Date: Tue, 1 Apr 2008 04:33:09 +0000 (-0700) Subject: Accept git aliases outside a git repository X-Git-Tag: v1.5.5-rc3~11 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e85dc0a3c7a3f4f8d5aade83fd340b8df73471cd;p=git.git Accept git aliases outside a git repository af05d67 (Always set *nongit_ok in setup_git_directory_gently(), 2008-03-25) had a change from the patch originally submitted that resulted in disabling aliases outside a git repository. It turns out that some people used "alias.fubar = diff --color-words" in $HOME/.gitconfig to use non-index diff (or any command that do not need git repository) outside git repositories, and this change broke them, so this resurrects the support for such usage. Signed-off-by: Junio C Hamano --- diff --git a/git.c b/git.c index b7729d72c..c4e4644b3 100644 --- a/git.c +++ b/git.c @@ -148,8 +148,9 @@ static int handle_alias(int *argcp, const char ***argv) const char** new_argv; const char *alias_command; char *alias_string; + int unused_nongit; - subdir = setup_git_directory_gently(NULL); + subdir = setup_git_directory_gently(&unused_nongit); alias_command = (*argv)[0]; alias_string = alias_lookup(alias_command);