On Jan 17, 2007, at 2:57 PM, Junio C Hamano wrote:
Brian Gernhardt <benji@xxxxxxxxxxxxxxxxxx> 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
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html