Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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 <gitster@pobox.com>
  • Loading branch information...
commit e85dc0a3c7a3f4f8d5aade83fd340b8df73471cd 1 parent f58dbf2
Junio C Hamano authored

Showing 1 changed file with 2 additions and 1 deletion. Show diff stats Hide diff stats

  1. +2 1  git.c
3  git.c
@@ -148,8 +148,9 @@ static int handle_alias(int *argcp, const char ***argv)
148 148 const char** new_argv;
149 149 const char *alias_command;
150 150 char *alias_string;
  151 + int unused_nongit;
151 152
152   - subdir = setup_git_directory_gently(NULL);
  153 + subdir = setup_git_directory_gently(&unused_nongit);
153 154
154 155 alias_command = (*argv)[0];
155 156 alias_string = alias_lookup(alias_command);

0 comments on commit e85dc0a

Please sign in to comment.
Something went wrong with that request. Please try again.