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

TopGit with rebased branches, problems with publishing (was: Branch dependencies)

From
MKmartin f krafft <madduck@madduck.net>
Date
Aug 3, 2011, 10:01 UTC
Message-ID
<20110803100156.GB27996@fishbowl.rw.madduck.net>
In-Reply-To
<CAKPyHN0EsXMKQ2g7ONaO4yw2ioPbMhg8XCsmB20je=O1DDeE5Q@mail.gmail.com>
also sprach Bert Wesarg <bert.wesarg@googlemail.com> [2011.08.03.0125 +0200]:
Show 10 quoted lines
> >> For my first mentioned problem, I think a new 'system' needs to be
> >> 'rebase' based, not merge based like TopGit.
> >
> > The problem with rebasing is that you cannot publish the branches.
> 
> That doesn't hold you back to publish them. But the other side need to
> know how to deal with them.
> 
> Saying that doesn't mean I know a good way to deal with them. I mostly
> end up using plumbing commands to deal with this.

Let me address this in terms of patch queue branches. Obviously, you are talking topic branches, but wrt rebase-publish, the two are identical. Patch queue branches are essentially quilt imports, e.g. one-commit-one-patch, usually edited with git rebase -i (which some people consider to be the better quilt).

The problem that led me away from patch queue branches is that — albeit unlikely in our context (distro packaging) — it is possible that you and I both rewrite the patch queue at the same time. The first one to push will then have his changes overwritten by the second push — in order to push the rebased ref, receive.denyNonFastForwards needs to be off.

Unfortunately, I can't see a remedy to this, apart from tagging each and every patch queue branch, but that does not solve the problem of having to merge changes made simultaneously. It could go something like this:

  1. ensure that noone has pushed an updated ref since you last
     fetched.
  2. if a new ref is found, download it and rebase your own patch
     queue on top of it, consolidating the changes.
  3. tag and push your new ref.

But there's a race condition in this, and so we're back to square one.

-- 
martin | http://madduck.net/ | http://two.sentenc.es/
 
uʍop ǝpısdn sı ɹoʇıuoɯ ɹnoʎ
 
spamtraps: madduck.bogus@madduck.net
Previous: martin f krafftNext: martin f krafft
Message 6 of 8 in “Branch dependencies”
  1. martin f krafftAug 1, 2011
  2. Bert WesargAug 2, 2011
  3. martin f krafftAug 2, 2011
  4. Bert WesargAug 2, 2011
  5. changing the set of dependencies (was: Branch dependencies)martin f krafft, Aug 3, 2011
  6. TopGit with rebased branches, problems with publishing (was: Branch dependencies)martin f krafft, Aug 3, 2011
  7. Tracking topic branches with rebases vs. merges (was: Branch dependencies)martin f krafft, Aug 3, 2011
  8. Nicolas SebrechtAug 4, 2011

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.