From: Brian Gernhardt Date: Wed, 17 Jan 2007 20:08:24 GMT Subject: Re: [PATCH] Introduce 'git-format-patch --suffix=patch' Message-ID: <6B51EBBF-1499-4E9B-856C-39DA5B8C4CC7@silverinsanity.com> In-Reply-To: <7vps9dqvdq.fsf@assigned-by-dhcp.cox.net> On Jan 17, 2007, at 2:57 PM, Junio C Hamano wrote: > Brian Gernhardt writes: > >> I think that the best form of DWIM is that if the suffix is "", then >> you simply skip the entire sprintf. Then any suffix has to have the >> '.', but no suffix doesn't have it. Additional DWIMMmery could >> remove an initial '.' from the suffix so that users expecting it to >> be there don't get ".." in their file. > > I think it is generally accepted on this list that that kind of > DWIMmery is bad. The first part seems like the easiest way to allow --suffix="" actually remove the suffix while removing the "Huh?" factor you mentioned. In fact, having --suffix="" add a suffix of "." is somewhat confusing all on it's own. The second just seems like an easy way to keep stupid mistakes from occurring, but isn't needed. I'll still post the patch, but not add the extra DWIMmery. I think it's a better alternative than having to choose between putting "." in all the suffixes and always having "." on the file. ~~ Brian