From: Johannes Sixt Date: Wed, 27 May 2009 07:14:27 GMT Subject: Re: [PATCH 2/2] diff: generate prettier filenames when using GIT_EXTERNAL_DIFF Message-ID: <4A1CE853.9080305@viscovery.net> In-Reply-To: <20090527070221.GC2986@gmail.com> David Aguilar schrieb: > On Wed, May 27, 2009 at 08:34:57AM +0200, Johannes Sixt wrote: >> David Aguilar schrieb: >>> +#include >> We don't have libgen.h on Windows :-( (at least not with my aging gcc >> 3.something). Would you please open-code the call to basename()? > > I don't know much about Windows. > Do we need to check for \ in addition to /? If the paths have been taken from the index or have passed through get_pathspec or prefix_filename, then it is sufficient to check for '/'. Otherwise, use is_dir_sep() (note it is a macro: don't call it like is_dir_sep(*c++)). -- Hannes