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

Re: "Branch objects" (was: Re: cherry picking and merge)

From
Tony Finch <dot@dotat.at>
Date
Aug 7, 2014, 11:38 UTC
Message-ID
<alpine.LSU.2.00.1408071222510.13901@hermes-1.csi.cam.ac.uk>
In-Reply-To
<20140806200726.GE23449@localhost>
Nico Williams <nico@cryptonector.com> wrote:
Show 22 quoted lines
> On Wed, Aug 06, 2014 at 08:31:18PM +0200, Jakub Narębski wrote:
> > On Wed, Aug 6, 2014 at 6:26 PM, Nico Williams <nico@cryptonector.com> wrote:
> > >
> > > My proposal was to put this sort of ancillary history info in a
> > > "branch object" (and that branches should be objects).
> >
> > Is it something like object-ified reflog, similar to how replacement
> > objects (git-replace) can be thought to be object-ified grafts (I know
> > they are more)? Do I understand it correctly?
>
> Yes, per-branch.  At push time a commit would be pushed to the upstream
> branch listing the commits pushed now (and who by).  Locally every
> rebase/cherry-pick/merge/commit onto the branch would appear in the
> branch object's history, kinda just like the reflog.  The main
> difference is that the upstream branch's history could be viewed.
>
> > With rebases the problem is that it would be nice to have (at least
> > for a short time) the history of series of patches (the metahistory,
> > or history of a branch), but usually one doesn't need old pre-rebase
> > version after cleaning up the history for publishing.
>
> Right.
I have been fiddling around in this area.

What I want to be able to do is develop fixes for open source code that I run, and get those fixes upstream. This means I need a rebasing workflow, to keep the patches up-to-date and to deal with code review feedback.

But this is inconvenient for deploying the patched version to production (which is the point of developing the fixes) - I want a fast-forwarding branch for that. And it would be nice to be able to share the history of the patch series, so others can see what changed between revisions more easily.

So I have a small tool which maintains a publication branch which tracks the head of a rebasing branch. It's reasonably satisfactory so far...

https://git.csx.cam.ac.uk/x/ucs/git/git-repub.git

... though the structure of the publication branch is weird and not very easy to navigate. You can see it in action in my git.git repo:

https://git.csx.cam.ac.uk/x/ucs/git/git.git/shortlog/refs/heads/ucam/fanf2/patch
Tony.
-- 
f.anthony.n.finch  <dot@dotat.at>  http://dotat.at/
Irish Sea: Variable 4. Slight. Showers. Good.
Previous: Nico WilliamsNext: Nico Williams
Message 3 of 9 in “"Branch objects" (was: Re: cherry picking and merge)”
  1. Jakub NarębskiAug 6, 2014
  2. Nico WilliamsAug 6, 2014
  3. Tony FinchAug 7, 2014
  4. Nico WilliamsAug 7, 2014
  5. Tony FinchAug 7, 2014
  6. Nico WilliamsAug 7, 2014
  7. Tony FinchAug 7, 2014
  8. Nico WilliamsAug 7, 2014
  9. Nico WilliamsAug 7, 2014

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.