From af05d67939f306a68c5f81ed30f65a82ae025661 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?SZEDER=20G=C3=A1bor?= Date: Tue, 25 Mar 2008 22:06:26 +0100 Subject: Always set *nongit_ok in setup_git_directory_gently() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit setup_git_directory_gently() only modified the value of its *nongit_ok argument if we were not in a git repository. Now it will always set it to 0 when we are inside a repository. Also remove now unnecessary initializations in the callers of this function. Signed-off-by: SZEDER Gábor Signed-off-by: Junio C Hamano --- git.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'git.c') diff --git a/git.c b/git.c index 13de8018f0..b7729d72cf 100644 --- a/git.c +++ b/git.c @@ -142,14 +142,14 @@ static int split_cmdline(char *cmdline, const char ***argv) static int handle_alias(int *argcp, const char ***argv) { - int nongit = 0, envchanged = 0, ret = 0, saved_errno = errno; + int envchanged = 0, ret = 0, saved_errno = errno; const char *subdir; int count, option_count; const char** new_argv; const char *alias_command; char *alias_string; - subdir = setup_git_directory_gently(&nongit); + subdir = setup_git_directory_gently(NULL); alias_command = (*argv)[0]; alias_string = alias_lookup(alias_command); -- cgit v1.2.1