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

Re: [PATCH] git-format-patch: add --output-directory long option again

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jun 6, 2006, 14:53 UTC
Message-ID
<Pine.LNX.4.63.0606061650360.2063@wbgn013.biozentrum.uni-wuerzburg.de>
In-Reply-To
<20060606141946.G59b8a1fd@leonov.stosberg.net>
Hi,
what idiot wrote that part of the code originally? ;-)
On Tue, 6 Jun 2006, Dennis Stosberg wrote:
Show 13 quoted lines
> @@ -243,6 +241,12 @@ int cmd_format_patch(int argc, const cha
>  	if (argc > 1)
>  		die ("unrecognized argument: %s", argv[1]);
>  
> +	if (output_directory && !stdout) {
> +		if (mkdir(output_directory, 0777) < 0 && errno != EEXIST)
> +			die("Could not create directory %s",
> +			    output_directory);
> +	}
> +
>  	if (rev.pending_objects && rev.pending_objects->next == NULL) {
>  		rev.pending_objects->item->flags |= UNINTERESTING;
>  		add_head(&rev);
Would it not be better to
	if (output_directory && stdout)
		die("What do you want: stdout or a directory?");

Ciao, Dscho

Previous: Dennis StosbergNext: Junio C Hamano
Message 2 of 4 in “git-format-patch: add --output-directory long option again”
  1. git-format-patch: add --output-directory long option againDennis Stosberg, Jun 6, 2006
  2. Johannes SchindelinJun 6, 2006
  3. Junio C HamanoJun 6, 2006
  4. Dennis StosbergJun 6, 2006

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.