Re: [PATCH] format-patch: introduce format.outputDirectory configuration

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

 



Alexander Kuleshov <kuleshovmail@xxxxxxxxx> writes:

> 2015-06-19 3:46 GMT+06:00 Junio C Hamano <gitster@xxxxxxxxx>:
>> I agree with "later -o should override an earlier one", but I do not
>> necessarily agree with "'-o -' should be --stdout", for a simple
>> reason that "-o foo" is not "--stdout >foo".
>>
>> Perhaps something like this to replace builtin/ part of Alexander's
>> patch?
>>
>> @@ -1337,6 +1342,9 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
>>                 die (_("--subject-prefix and -k are mutually exclusive."));
>>         rev.preserve_subject = keep_subject;
>>
>> +       if (!output_directory && !use_stdout)
>> +               output_directory = config_output_directory;
>> +
>>
>
> But there is following condition above:
>
>  if (!use_stdout)
>       output_directory = set_outdir(prefix, output_directory);
>
> After which output_directory will be "./" everytime and
>
>>
>> +       if (!output_directory && !use_stdout)
>> +               output_directory = config_output_directory;
>> +
>>
>
> will not work here.

I thought I made that "if we did not see '-o dir' on the command
line, initialize output_directory to what we read from the config"
before we make a call to set_outdir().

What I am missing?  

Puzzled...  FWIW, IIRC, the patch you are responding to passed the
test you added.

--
To unsubscribe from this list: send the line "unsubscribe git" in



[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]