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

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

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
Jun 14, 2013, 13:34 UTC
Message-ID
<CALkWK0nyNXsyzoTVz9vE5c5FP5k-KnPpzW2LryuCtmLP4WLXZA@mail.gmail.com>
In-Reply-To
<20130614131629.GA1086@paksenarrion.iveqy.com>
Fredrik Gustafsson wrote:
> However I think this patch can improve the workflow for experienced
> developers. Can we tweak this in some way to get the best out of both
> worlds?

The main problem is that output-directory can be an absolute path (like ~, in the extreme case). I'm not sure how to trade-off safety for speed. My main itch is that completion doesn't work with my fp:

  alias.fp = !rm -rf outgoing && git format-patch -M -C -o outgoing
Show 8 quoted lines
>> +             struct strbuf buf = STRBUF_INIT;
>> +
>>               if (use_stdout)
>>                       die(_("standard output, or directory, which one?"));
>> +             strbuf_addstr(&buf, output_directory);
>> +             remove_dir_recursively(&buf, 0);
>
> Should we have a strbuf_release here?
Yeah, my stupidity.
Previous: Fredrik GustafssonNext: Fredrik Gustafsson
Message 8 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.