{"thread":{"id":"15960","subject":"[PATCH] git-format-patch(1)- add note about creating patch for single commit","startedAt":"2008-10-19T04:54:44Z","lastAt":"2008-10-19T05:33:52Z","messageCount":4,"participants":["Dan McGee","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"93408","messageId":"1224392084-12956-1-git-send-email-dpmcgee@gmail.com","threadId":"15960","inReplyTo":null,"subject":"[PATCH] git-format-patch(1)- add note about creating patch for single commit","fromName":"Dan McGee","fromEmail":"dpmcgee@gmail.com","sentAt":"2008-10-19T04:54:44Z","receivedAt":"2008-10-19T04:54:44Z","isPatch":true,"sender":{"key":"dpmcgee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/265817?v=4"},"body":"Signed-off-by: Dan McGee <dpmcgee@gmail.com>\n---\n\nI thought this would be helpful because it took me the beter part of an hour\nto find a solution instead of specifying C~1..C or other crazy things. The\ncurrent documentation just leaves you hanging when what you really want is\njust one formatted patch.\n\nIf there any suggestions on better wording, feel free to resubmit or whatever-\nI just felt like this should be documented somewhere.\n\n Documentation/git-format-patch.txt |    4 +++-\n 1 files changed, 3 insertions(+), 1 deletions(-)\n\ndiff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt\nindex adb4ea7..8518c33 100644\n--- a/Documentation/git-format-patch.txt\n+++ b/Documentation/git-format-patch.txt\n@@ -46,7 +46,9 @@ applies to that command line and you do not get \"everything\n since the beginning of the time\".  If you want to format\n everything since project inception to one commit, say \"git\n format-patch \\--root <commit>\" to make it clear that it is the\n-latter case.\n+latter case.  If you want to format only a single commit, say \"git\n+format-patch <commit>^!\" (which excludes all parent revisions of the\n+specified commit).\n \n By default, each output file is numbered sequentially from 1, and uses the\n first line of the commit message (massaged for pathname safety) as\n-- \n1.6.0.2\n"},{"id":"93409","messageId":"7v1vyd9n3d.fsf@gitster.siamese.dyndns.org","threadId":"15960","inReplyTo":"1224392084-12956-1-git-send-email-dpmcgee@gmail.com","subject":"Re: [PATCH] git-format-patch(1)- add note about creating patch for single commit","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-10-19T05:21:26Z","receivedAt":"2008-10-19T05:21:26Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Dan McGee <dpmcgee@gmail.com> writes:\n\n> Signed-off-by: Dan McGee <dpmcgee@gmail.com>\n> ---\n>\n> I thought this would be helpful because it took me the beter part of an hour\n> to find a solution instead of specifying C~1..C or other crazy things. The\n> current documentation just leaves you hanging when what you really want is\n> just one formatted patch.\n>\n> If there any suggestions on better wording, feel free to resubmit or whatever-\n> I just felt like this should be documented somewhere.\n>\n>  Documentation/git-format-patch.txt |    4 +++-\n>  1 files changed, 3 insertions(+), 1 deletions(-)\n>\n> diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt\n> index adb4ea7..8518c33 100644\n> --- a/Documentation/git-format-patch.txt\n> +++ b/Documentation/git-format-patch.txt\n> @@ -46,7 +46,9 @@ applies to that command line and you do not get \"everything\n>  since the beginning of the time\".  If you want to format\n>  everything since project inception to one commit, say \"git\n>  format-patch \\--root <commit>\" to make it clear that it is the\n> -latter case.\n> +latter case.  If you want to format only a single commit, say \"git\n> +format-patch <commit>^!\" (which excludes all parent revisions of the\n> +specified commit).\n>  \n>  By default, each output file is numbered sequentially from 1, and uses the\n>  first line of the commit message (massaged for pathname safety) as\n\nHeh, a more natural way to say that is:\n\n\tgit format-patch -1 $that_one\n\nThat uses the first option described in the documentation:\n\n\t-<n>::\n        \tLimits the number of patches to prepare.\n"},{"id":"93410","messageId":"449c10960810182226t5e2ae1ay4b53656a7cac4606@mail.gmail.com","threadId":"15960","inReplyTo":"7v1vyd9n3d.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] git-format-patch(1)- add note about creating patch for single commit","fromName":"Dan McGee","fromEmail":"dpmcgee@gmail.com","sentAt":"2008-10-19T05:26:35Z","receivedAt":"2008-10-19T05:26:35Z","isPatch":true,"sender":{"key":"dpmcgee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/265817?v=4"},"body":"On Sun, Oct 19, 2008 at 12:21 AM, Junio C Hamano <gitster@pobox.com> wrote:\n> Dan McGee <dpmcgee@gmail.com> writes:\n>\n>> Signed-off-by: Dan McGee <dpmcgee@gmail.com>\n>> ---\n>>\n>> I thought this would be helpful because it took me the beter part of an hour\n>> to find a solution instead of specifying C~1..C or other crazy things. The\n>> current documentation just leaves you hanging when what you really want is\n>> just one formatted patch.\n>>\n>> If there any suggestions on better wording, feel free to resubmit or whatever-\n>> I just felt like this should be documented somewhere.\n>>\n>>  Documentation/git-format-patch.txt |    4 +++-\n>>  1 files changed, 3 insertions(+), 1 deletions(-)\n>>\n>> diff --git a/Documentation/git-format-patch.txt b/Documentation/git-format-patch.txt\n>> index adb4ea7..8518c33 100644\n>> --- a/Documentation/git-format-patch.txt\n>> +++ b/Documentation/git-format-patch.txt\n>> @@ -46,7 +46,9 @@ applies to that command line and you do not get \"everything\n>>  since the beginning of the time\".  If you want to format\n>>  everything since project inception to one commit, say \"git\n>>  format-patch \\--root <commit>\" to make it clear that it is the\n>> -latter case.\n>> +latter case.  If you want to format only a single commit, say \"git\n>> +format-patch <commit>^!\" (which excludes all parent revisions of the\n>> +specified commit).\n>>\n>>  By default, each output file is numbered sequentially from 1, and uses the\n>>  first line of the commit message (massaged for pathname safety) as\n>\n> Heh, a more natural way to say that is:\n>\n>        git format-patch -1 $that_one\n>\n> That uses the first option described in the documentation:\n>\n>        -<n>::\n>                Limits the number of patches to prepare.\n\nWow, had no idea about that option. :)\n\nGiven that I didn't even notice this option when I did go to the\nmanpage, what if my above change was instead reworked a bit:\n>> +latter case.  If you want to format only a single commit, say \"git\n>> +format-patch -1 <commit>\" .\n"},{"id":"93411","messageId":"7vwsg587y7.fsf@gitster.siamese.dyndns.org","threadId":"15960","inReplyTo":"449c10960810182226t5e2ae1ay4b53656a7cac4606@mail.gmail.com","subject":"Re: [PATCH] git-format-patch(1)- add note about creating patch for single commit","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-10-19T05:33:52Z","receivedAt":"2008-10-19T05:33:52Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Dan McGee\" <dpmcgee@gmail.com> writes:\n\n> On Sun, Oct 19, 2008 at 12:21 AM, Junio C Hamano <gitster@pobox.com> wrote:\n>\n>> Heh, a more natural way to say that is:\n>>\n>>        git format-patch -1 $that_one\n>>\n>> That uses the first option described in the documentation:\n>>\n>>        -<n>::\n>>                Limits the number of patches to prepare.\n>\n> Wow, had no idea about that option. :)\n>\n> Given that I didn't even notice this option when I did go to the\n> manpage, what if my above change was instead reworked a bit:\n>>> +latter case.  If you want to format only a single commit, say \"git\n>>> +format-patch -1 <commit>\" .\n\nI thought about it, but saw \"formatting three commits\" example in the\nmanpage, and stopped there ;-)\n"}]}