Always set *nongit_ok in setup_git_directory_gently()
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 <szeder@ira.uka.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
660b9c3a4e
commit
af05d67939
@ -210,7 +210,7 @@ int cmd_diff(int argc, const char **argv, const char *prefix)
|
||||
int ents = 0, blobs = 0, paths = 0;
|
||||
const char *path = NULL;
|
||||
struct blobinfo blob[2];
|
||||
int nongit = 0;
|
||||
int nongit;
|
||||
int result = 0;
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user