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

Re: [PATCH] format-patch: remove existing output-directory

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 14, 2013, 13:55 UTC
Message-ID
<7vip1gssoh.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20130614130910.GF23890@serenity.lan>
John Keeping <john@keeping.me.uk> writes:
Show 15 quoted lines
> On Fri, Jun 14, 2013 at 06:13:33PM +0530, Ramkumar Ramachandra wrote:
>> The following command
>> 
>>   $ git format-patch -o outgoing master
>> 
>> does not ensure that the output-directory outgoing doesn't already
>> exist.  As a result, it's possible for patches from two different series
>> to get mixed up if the user is not careful.  Fix the problem by
>> unconditionally removing the output-directory before writing to it.
>
> I don't think this is the correct behaviour.  I can think of cases where
> I would want to output multiple things into the same directory.
>
> It may be better to issue a warning when this happens, or die and
> provide a flag to let the user bypass that.

Absolutely. I think this too dangeous, and will kill the possibility to further improve "format-patch -v$n".

An option (and configuration that expresses the user's wish) to error out when -o diretory exists is probably as far as we would want to go. Removal is way too much to accept without risk of hurting users.

Previous: Junio C HamanoNext: Fredrik Gustafsson
Message 6 of 12 in “format-patch: remove existing output-directory”
  1. format-patch: remove existing output-directoryRamkumar Ramachandra, Jun 14, 2013
  2. John KeepingJun 14, 2013
  3. Ramkumar RamachandraJun 14, 2013
  4. John KeepingJun 14, 2013
  5. Junio C HamanoJun 14, 2013
  6. Junio C HamanoJun 14, 2013
  7. Fredrik GustafssonJun 14, 2013
  8. Ramkumar RamachandraJun 14, 2013
  9. Fredrik GustafssonJun 14, 2013
  10. Ramkumar RamachandraJun 14, 2013
  11. SZEDER GáborJun 14, 2013
  12. Ramkumar RamachandraJun 14, 2013

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.