{"thread":{"id":"4675","subject":"Rework a patch serie","startedAt":"2006-06-27T08:41:30Z","lastAt":"2006-06-27T10:16:44Z","messageCount":3,"participants":["moreau francis","Andreas Ericsson","Karl Hasselström"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"22648","messageId":"20060627084130.28886.qmail@web25814.mail.ukl.yahoo.com","threadId":"4675","inReplyTo":null,"subject":"Rework a patch serie","fromName":"moreau francis","fromEmail":"francis_moreau2000@yahoo.fr","sentAt":"2006-06-27T08:41:30Z","receivedAt":"2006-06-27T08:41:30Z","isPatch":false,"sender":{"key":"francis_moreau2000@yahoo.fr","avatar":null},"body":"Hello\n\nSeveral times I have a topic branch that contains several commits like\nthis:\n\n            \"master\"\n        o---o\n             \\                    \"topic\"\n              o---o---o---o---o---o\n\n\nWhen I think everything is in a good shape I generate several patches to\nsubmit them. For that, I do:\n\n        $ git checkout topic\n        $ git-format-patch -s -k -n master\n        001-aaa.patch\n        002-bbb.patch\n        [...]\n        006-fff.patch\n\nThen I submit these patches for reviewing. Unfortunately, they're not perfect,\nso after some feedbacks from the communauty it appears that I need to make\nsmall modifications in the second commit in the topic branch for example...\n\nWhat is the best and fastest way to do that ? Should I create a new topic branch\nand cherry pick from the old one ?\n\nThanks for your advices\n\nFrancis\n"},{"id":"22649","messageId":"44A0F1F7.9010503@op5.se","threadId":"4675","inReplyTo":"20060627084130.28886.qmail@web25814.mail.ukl.yahoo.com","subject":"Re: Rework a patch serie","fromName":"Andreas Ericsson","fromEmail":"ae@op5.se","sentAt":"2006-06-27T08:53:11Z","receivedAt":"2006-06-27T08:53:11Z","isPatch":false,"sender":{"key":"ae@op5.se","avatar":"https://gravatar.com/avatar/426e89595c75a8f5252dd0c989e5fabe5bcac616e68557427ad9aef6b0ca342a?d=mp&s=160"},"body":"moreau francis wrote:\n> Hello\n> \n> Several times I have a topic branch that contains several commits like\n> this:\n> \n>             \"master\"\n>         o---o\n>              \\                    \"topic\"\n>               o---o---o---o---o---o\n> \n> \n> When I think everything is in a good shape I generate several patches to\n> submit them. For that, I do:\n> \n>         $ git checkout topic\n>         $ git-format-patch -s -k -n master\n>         001-aaa.patch\n>         002-bbb.patch\n>         [...]\n>         006-fff.patch\n> \n> Then I submit these patches for reviewing. Unfortunately, they're not perfect,\n> so after some feedbacks from the communauty it appears that I need to make\n> small modifications in the second commit in the topic branch for example...\n> \n> What is the best and fastest way to do that ? Should I create a new topic branch\n> and cherry pick from the old one ?\n> \n\nIt really depends on what the problem is. If it's a thinko in the design \nI usually find it worth keeping to avoid falling in the same trap again. \n  I do the same for bugfixes, although some don't like that (I'm lazy, \nthey're anal). In this case, patches go on top of topic. Typos and stuff \ncan usually be changed inside the patch-file, in which case you can just \napply them to a new topic-branch.\n\nIt all boils down to how lazy you are, how much of your f***ups you want \nto preserve (they *are* useful sometimes) and what you prefer, really.\n\n-- \nAndreas Ericsson                   andreas.ericsson@op5.se\nOP5 AB                             www.op5.se\nTel: +46 8-230225                  Fax: +46 8-230231\n"},{"id":"22655","messageId":"20060627101644.GA397@diana.vm.bytemark.co.uk","threadId":"4675","inReplyTo":"20060627084130.28886.qmail@web25814.mail.ukl.yahoo.com","subject":"Re: Rework a patch serie","fromName":"Karl Hasselström","fromEmail":"kha@treskal.com","sentAt":"2006-06-27T10:16:44Z","receivedAt":"2006-06-27T10:16:44Z","isPatch":false,"sender":{"key":"kha@treskal.com","avatar":"https://gravatar.com/avatar/f0120c734b5279b345075a28521e1ac66acb20c9913ffe9bf6ae97e53f7f3f13?d=mp&s=160"},"body":"On 2006-06-27 08:41:30 +0000, moreau francis wrote:\n\n> Then I submit these patches for reviewing. Unfortunately, they're\n> not perfect, so after some feedbacks from the communauty it appears\n> that I need to make small modifications in the second commit in the\n> topic branch for example...\n>\n> What is the best and fastest way to do that ? Should I create a new\n> topic branch and cherry pick from the old one ?\n\nstgit is a good fit for this situation. You just pop patches off the\nstack untill you reach the one you want to modify, then do your\nchanges, refresh the patch, and push the other patches back. (If you\nwant to keep the original series for future reference, you can simply\ntag HEAD before you embark on this procedure.)\n\n-- \nKarl Hasselström, kha@treskal.com\n      www.treskal.com/kalle\n"}]}