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

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

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Sep 22, 2015, 00:05 UTC
Message-ID
<CAPig+cQsfTz7UzVcB1D8iu5on0o7E9nOv=WtzrR-GBmm=cdEpw@mail.gmail.com>
In-Reply-To
<xmqqk2rj8kf5.fsf@gitster.mtv.corp.google.com>
On Mon, Sep 21, 2015 at 6:41 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 28 quoted lines
> Eric Sunshine <sunshine@sunshineco.com> writes:
>> On Fri, Jun 19, 2015 at 2:28 PM, Alexander Kuleshov
>> <kuleshovmail@gmail.com> wrote:
>>> We can pass -o/--output-directory to the format-patch command to
>>> store patches not in the working directory. This patch introduces
>>> format.outputDirectory configuration option for same purpose.
>>>
>>> The case of usage of this configuration option can be convinience
>>
>> s/convinience/convenience/
>>
>>> to not pass everytime -o/--output-directory if an user has pattern
>>
>> s/everytime/every time/
>>
>>> to store all patches in the /patches directory for example.
>>>
>>> The format.outputDirectory has lower priority than command line
>>> option, so if user will set format.outputDirectory and pass the
>>> command line option, a result will be stored in a directory that
>>> passed to command line option.
>>>
>>> Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
>>> ---
>
> Looks like there were mostly editorial niggles and no fundamental
> flaws in the design of the patch; it is somewhat a shame to make all
> the efforts go to waste.  Will we be seeing an update soon?
Looking at the new test a bit more closely...
    test_expect_success "format-patch format.outputDirectory option" '
        git config format.outputDirectory "patches/" &&
        git format-patch master..side &&
        cnt=$(ls | wc -l) &&
        test $cnt = 3 &&
        test_config format.outputDirectory "patches/" &&
        git config --unset format.outputDirectory
    '

I'm wondering what it's really testing. I presume that it wanted to count the number of files in the 'patches/' directory, however, the 'ls' is being invoked in the test trash directory instead. It turns out that the trash directory has three entries at this point, so the test succeeds, but entirely by accident.

Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 14 in “format-patch: introduce format.outputDirectory configuration”
  1. format-patch: introduce format.outputDirectory configurationAlexander Kuleshov, Jun 19, 2015
  2. Eric SunshineJun 19, 2015
  3. Junio C HamanoSep 21, 2015
  4. Eric SunshineSep 22, 2015
  5. Junio C HamanoOct 28, 2015
  6. format-patch: introduce format.outputDirectory configurationStephen P. Smith, Jan 10, 2016
  7. Eric SunshineJan 10, 2016
  8. format-patch: introduce format.outputDirectory configurationStephen P. Smith, Jan 11, 2016
  9. Eric SunshineJan 11, 2016
  10. Eric SunshineJan 11, 2016
  11. format-patch: introduce format.outputDirectory configurationStephen P. Smith, Jan 13, 2016
  12. Eric SunshineJan 13, 2016
  13. format-patch: introduce format.outputDirectory configurationStephen P. Smith, Jan 13, 2016
  14. Eric SunshineJan 13, 2016

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.