Jonathan Nieder <> writes:

> Thomas Gummerer wrote:
>> --- a/builtin/diff.c
>> +++ b/builtin/diff.c
>> @@ -295,7 +295,9 @@ int cmd_diff(int argc, const char **argv, const char 
>> *prefix)
>>                      break;
>>      }
>> -    prefix = setup_git_directory_gently(&nongit);
>> +    if (!no_index)
>> +            prefix = setup_git_directory_gently(&nongit);
> What is the value of nongit in the no_index case?

In the no_index case it doesn't matter, since no_index is always checked
first.  The only other place where it is used, when no_index is set
is after diff_no_index, which can't be reached if no_index is set.  I
could initialize nongit to 0, but I don't think that would change

I've also seen that the no_index and nongit parameters to diff_no_index
are not needed anymore, and will remove them in the re-roll therefore.

I'll wait to see if there are any more comments and then send a re-roll.


To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to