git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: sending changesets from the middle of a git tree

From
RARyan Anderson <ryan@michonline.com>
Date
Aug 14, 2005, 04:02 UTC
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:
Show 10 quoted lines
> 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
Previous: Steve FrenchNext: Ryan Anderson
Message 2 of 12 in “sending changesets from the middle of a git tree”
  1. Steve FrenchAug 14, 2005
  2. Ryan AndersonAug 14, 2005
  3. Ryan AndersonAug 15, 2005
  4. Linus TorvaldsAug 14, 2005
  5. Linus TorvaldsAug 14, 2005
  6. Junio C HamanoAug 14, 2005
  7. Petr BaudisAug 14, 2005
  8. Junio C HamanoAug 15, 2005
  9. Catalin MarinasAug 15, 2005
  10. Wolfgang DenkAug 17, 2005
  11. Junio C HamanoAug 17, 2005
  12. Catalin MarinasAug 15, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.