From: Linus Torvalds Date: Sat, 07 Jan 2006 23:35:08 GMT Subject: Re: [PATCH 2/3] ls-files --others --directory: give trailing slash Message-ID: In-Reply-To: <7vy81racv7.fsf@assigned-by-dhcp.cox.net> On Sat, 7 Jan 2006, Junio C Hamano wrote: > > * Likes, dislikes? This suits better for *my* purpose of > calling this from git-status, but it might be undesirable for > your Porcelain. Likes. However, I'd re-write it as just memcpy(fullname + baselen + len, "/", 2); len++; if (show_other_directories && !dir_exists(fullname, baselen + len)) break; read_directory(fullname, fullname, baselen + len); because let's face it, every user wants the "+1", so just do it once up-front instead of adding one in three different places. Linus