git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Alexander Kuleshov <kuleshovmail@gmail.com>
Date
Jun 19, 2015, 17:27 UTC
Message-ID
<CANCZXo7Lyo_Sb=bxF9EgZHV35JfrQZ-CFsM9T4yUjkDBndcp8A@mail.gmail.com>
In-Reply-To
<CANCZXo5Nyt+JePQP=kvFsjTaV=xKXduoBqAwp5E0CrEf13QK7g@mail.gmail.com>

Ah, you mean to put this check before. Just tested it and many tests are broken. Will look on it now

2015-06-19 23:19 GMT+06:00 Alexander Kuleshov <kuleshovmail@gmail.com>:
Show 47 quoted lines
>> 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.
>
> Ok, Now we have:
>
> if (!use_stdout)
>         output_directory = set_outdir(prefix, output_directory);
> else
>         setup_pager();
>
> and
>
> if (output_directory) {
>     // test that we did not pass use_stdout and mkdir than
> }
>
> If we didn't pass --stdout and -o the set_outdir will be called
> and there is
>
> static const char *set_outdir(const char *prefix, const char *output_directory)
> {
>     //printf("is_absoulte_path %d\n", is_absolute_path(output_directory));
>     if (output_directory && is_absolute_path(output_directory))
>         return output_directory;
>
>     if (!prefix || !*prefix) {
>         if (output_directory)
>             return output_directory;
>         return "./";
>     }
> ....
> }
>
> So it returns "./", output_directory will not be null. After this
>
>>> +       if (!output_directory && !use_stdout)
>>> +               output_directory = config_output_directory;
>
> clause will not be executed never. Or I've missed something?
>
> Thank you.
Previous: Alexander KuleshovNext: Alexander Kuleshov
Message 14 of 18 in “format-patch: introduce format.outputDirectory configuration”
  1. format-patch: introduce format.outputDirectory configurationAlexander Kuleshov, Jun 18, 2015
  2. Junio C HamanoJun 18, 2015
  3. Jeff KingJun 18, 2015
  4. Junio C HamanoJun 18, 2015
  5. Junio C HamanoJun 18, 2015
  6. Jeff KingJun 18, 2015
  7. Jeff KingJun 18, 2015
  8. Junio C HamanoJun 18, 2015
  9. Jeff KingJun 19, 2015
  10. Alexander KuleshovJun 19, 2015
  11. Alexander KuleshovJun 19, 2015
  12. Junio C HamanoJun 19, 2015
  13. Alexander KuleshovJun 19, 2015
  14. Alexander KuleshovJun 19, 2015
  15. Alexander KuleshovJun 19, 2015
  16. Junio C HamanoJun 19, 2015
  17. Remi Galan AlfonsoJun 19, 2015
  18. Alexander KuleshovJun 19, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.