Re: [PATCH] git config: error when editing a repo config and not being in one

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Johannes Schindelin <Johannes.Schindelin@xxxxxx> writes:

> Hi,
>
> On Thu, 30 Apr 2009, Felipe Contreras wrote:
>
>> diff --git a/builtin-config.c b/builtin-config.c
>> index d8da72c..6e936e1 100644
>> --- a/builtin-config.c
>> +++ b/builtin-config.c
>> @@ -390,6 +390,8 @@ int cmd_config(int argc, const char **argv, const char *unused_prefix)
>>  	}
>>  	else if (actions == ACTION_EDIT) {
>>  		check_argc(argc, 0, 0);
>> +		if (!config_exclusive_filename && !is_inside_git_dir())
>> +			die("not in a git directory");
>
> Why not use the nongit variable?

Good; makes a lot more sense.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]