git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* recommendation for patch maintenance
@ 2012-12-21 14:45 Manlio Perillo
  2012-12-21 17:01 ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: Manlio Perillo @ 2012-12-21 14:45 UTC (permalink / raw)
  To: git

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi.

I would like to have advices about some possible workflows to use when
maintaining a patch, that can evolve over the time (fixing bugs, and
applying advices from reviewers).

In my case I have a single commit to maintain.


The workflow I use now is this:

  1) create a topic branch, e.g. mp/complete-path
  2) write code
  3) commit
  4) format-patch --output=mp/complete-patch master
  5) review the patch
  6) send-email

when I need to update the patch:

  1) modify code
  2) commit --amend
  3) format-patch --subject-prefix="PATCH v<n>" \
     --output=mp/complete-patch master
  4) edit patch to add a list of what was changed
  5) review the patch
  6) send-email


This is far from ideal, since all my local changes are lost.
Another problem is that when I found some trivial error in 5), I need to
call format-patch again, loosing the "what's changed list".


A possible solution is to:

1) create a "public" topic branch, e.g. mp/complete-patch
2) create the associated "private" topic branch, e.g.
   mp/complete-patch/private
...

Changes are committed to the private branch.
When I need to update the patch:

  1) update code
  2) commit new changes; the commit message will contain the
     "what's changed" list to be used for the new version of the patch
  3) checkout <public branch>
  4) merge --squash <private branch>

Now I have my full history, and the "what's changed list" is saved in
the private commits.

(not tested)


What is the workflow you usually use?


Thanks   Manlio
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlDUde4ACgkQscQJ24LbaUSqOwCfZON5f9mdAYkvACim802JGFhP
5W8An1Y7WXgsH/Q/p1/0jVMo1dJ3HwwO
=Xydn
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-12-21 22:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-21 14:45 recommendation for patch maintenance Manlio Perillo
2012-12-21 17:01 ` Junio C Hamano
2012-12-21 17:29   ` Manlio Perillo
2012-12-21 18:17     ` Junio C Hamano
2012-12-21 21:30       ` Manlio Perillo
2012-12-21 22:17         ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).