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

Re: [PATCH] Teach mailsplit about Maildir's

From
Junio C Hamano <junkio@cox.net>
Date
May 21, 2007, 03:15 UTC
Message-ID
<7vd50uj29r.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20070520181447.GA10638@ferdyx.org>
"Fernando J. Pereda" <ferdy@gentoo.org> writes:
Show 24 quoted lines
> -	ret = split_mbox(argp, dir, allow_bare, nr_prec, nr);
> +	while (*argp) {
> +		const char *arg = *argp++;
> +		struct stat argstat;
> +
> +		if (arg[0] == '-' && arg[1] == 0) {
> +			ret |= split_mbox(arg, dir, allow_bare, nr_prec, nr);
> +			continue;
> +		}
> +
> +		if (stat(arg, &argstat) == -1) {
> +			error("cannot stat %s (%s)", arg, strerror(errno));
> +			return 1;
> +		}
> +
> +		if (S_ISDIR(argstat.st_mode))
> +			ret |= split_maildir(arg, dir, nr_prec, nr);
> +		else
> +			ret |= split_mbox(arg, dir, allow_bare, nr_prec, nr);
> +	}
> +
>  	if (ret != -1)
>  		printf("%d\n", ret);
>  

No kidding. ret |= stuff and then printf("%d\n", ret) would not give us the number of commit e-mails on the standard output.

Previous: Johannes SchindelinNext: Johannes Schindelin
Message 11 of 21 in “Teach mailsplit about Maildir's”
  1. Teach mailsplit about Maildir'sFernando J. Pereda, May 20, 2007
  2. Junio C HamanoMay 20, 2007
  3. Alex RiesenMay 20, 2007
  4. Fernando J. PeredaMay 20, 2007
  5. Alex RiesenMay 20, 2007
  6. Fernando J. PeredaMay 20, 2007
  7. Johan HerlandMay 20, 2007
  8. Fernando J. PeredaMay 20, 2007
  9. Johan HerlandMay 20, 2007
  10. Johannes SchindelinMay 21, 2007
  11. Junio C HamanoMay 21, 2007
  12. Johannes SchindelinMay 21, 2007
  13. Fernando J. PeredaMay 21, 2007
  14. Fernando J. PeredaMay 21, 2007
  15. Allow user to specify mailbox format for mailsplitAlex Riesen, May 21, 2007
  16. Junio C HamanoMay 21, 2007
  17. Alex RiesenMay 22, 2007
  18. Junio C HamanoMay 24, 2007
  19. Fernando J. PeredaMay 24, 2007
  20. Junio C HamanoMay 24, 2007
  21. Teach mailsplit about Maildir'sFernando J. Pereda, May 24, 2007

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.