On 11 November 2011 15:07, 陳韋任 <che...@iis.sinica.edu.tw> wrote: > On Fri, Nov 11, 2011 at 03:02:16PM +0000, Peter Maydell wrote: >> On 11 November 2011 14:53, Chen Wei-Ren (陳韋任) <che...@iis.sinica.edu.tw> >> wrote: >> > From: Chen Wei-Ren <che...@iis.sinica.edu.tw> >> > >> > Remove qruncom target from the Makefile file since we have >> > removed libqemu example (qruncom.c). >> >> This should be done before the patch removing qruncom.c, not after. >> Or do both in the same patch. > > I'll reverse the order next time. Is there a rule of thumb about how > to order those patches?
The rule of thumb is that you should never break the tree at any point between two patches in a series. So if you're adding a new file then the makefile change goes in the same patch or after it. If you're deleting a file the makefile change happens first or in the same patch. If you're making related changes to two files where both changes are required for things to work (eg renaming a header file and updating the #include lines) then the change has to be done as a single patch. (The rule is there to allow people to find bugs later using "git bisect" and similar tools without running into points in the revision history where the system was broken. For a test program it is a bit less important but it's worth keeping to the rule anyway.) -- PMM