From: Ryan Anderson Date: Sun, 14 Aug 2005 04:02:33 GMT Subject: Re: sending changesets from the middle of a git tree Message-ID: <20050814040233.GC6844@mythryan2.michonline.com> In-Reply-To: <42FEBC16.9050309@austin.rr.com> On Sat, Aug 13, 2005 at 10:35:50PM -0500, Steve French wrote: > Just to confirm a recent answer to questions on lkml ... > > 1) There is no way to send a particular changeset from the "middle" of a > set from one tree to another, without exporting it as a patch or > rebuilding a new git tree. I have two changesets that, after testing > last week, I now consider more important to send upstream than the few > earlier and later changesets. If I export those two changesets as > patches, and send them on. presumably I lose the changset comments etc. > and then when the upstream tree is merged back, it might look a little > odd in the changeset history. You can keep most of the metadata you want with "git format-patch". Extract the changes you need, mail them off. When you later merge things back together, it should be a trivial merge, hopefully. > 2) There is no way to update the comment field of a changeset after it > goes in (e.g. to add a bugzilla bug number for a bug that was opened > just after the fix went in). No, a commit is immutable. You can use "git format-patch" to rebase things if you need. I prefer to use "git format-patch --mbox", edit what I need to, then use git-applymbox to rebase it all against a clean tree. > 3) There is no way to do a test commit of an individual changeset > against a specified tree (to make sure it would still merge cleanly, > automatically). Not sure on this one - in this case, it almost sounds like you want the feature set of StGit, and/or quilt. (If "quilt push" succeeds, clearly it still merges cleanly.) -- Ryan Anderson sometimes Pug Majere