Re: [PATCH] Introduce 'git-format-patch --suffix=patch'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Jan 17, 2007, at 2:27 PM, Junio C Hamano wrote:

Andy Whitcroft <apw@xxxxxxxxxxxx> writes:

-	strcpy(filename + len, ".txt");
+	sprintf(filename + len, ".%s", fmt_patch_suffix);

This doesn't give us any possibility of not having a suffix. Can we not
include the . in the suffix here so that we can specify it as "".

I've considered it, but I do not think it is worth it.

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.

Patch (on top of yours) should follow shortly.

~~ 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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]