From: Junio C Hamano Date: Thu, 08 Nov 2007 02:09:26 GMT Subject: Re: [PATCH amend] git-mailsplit: with maildirs not only process cur/, but also new/ Message-ID: <7vfxzh7ajt.fsf@gitster.siamese.dyndns.org> In-Reply-To: <20071106085418.14211.qmail@54d7c9212e25c5.315fe32.mid.smarden.org> Gerrit Pape writes: > When saving patches to a maildir with e.g. mutt, the files are put into > the new/ subdirectory of the maildir, not cur/. This makes git-am state > "Nothing to do.". This patch lets git-mailsplit additional check new/ > after reading cur/. > > This was reported by Joey Hess through > http://bugs.debian.org/447396 > > Signed-off-by: Gerrit Pape > --- > > On Mon, Nov 05, 2007 at 01:58:50PM +0100, Jakub Narebski wrote: >> > + for (i = 0; i < 2; ++i) { >> Wouldn't it be better to use sizeof(sub)/sizeof(sub[0]) or it's macro >> equivalent ARRAY_SIZE(sub) instead of hardcoding 2 to avoid errors? > I made the array NULL-terminated. > > On Mon, Nov 05, 2007 at 04:26:24PM -0500, Jeff King wrote: >> Isn't the subject line now wrong? > Yes, thanks. > > On Mon, Nov 05, 2007 at 11:52:58PM +0100, Alex Riesen wrote: >> Why is missing "cur" (or "new", for that matter) a fatal error? >> Why is it error at all? How about just ignoring the fact? > As suggested by Jeff, I made it ignore the error on ENOENT. Looks good to me. Final acks please?