[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Git, where zombie branches shamble again

From: Larry McVoy
Subject: Re: Git, where zombie branches shamble again
Date: Tue, 2 Nov 2021 08:02:21 -0700
User-agent: Mutt/1.5.24 (2015-08-30)

On Tue, Nov 02, 2021 at 07:20:03AM +0000, Werner LEMBERG wrote:
> >> You absolutely _did_ rewrite history ... not just once, but twice!
> >> You deleted an _entire branch_ of published development history,
> >> then after my subsequent push had reinstated it, you deleted it
> >> once again!  If that isn't rewriting history, then I'd like to know
> >> what you would call it.  [...]
> Keith, what Brandon does it *exactly* what is common if you use the
> GUI of gitlab, github, and other such sites.
> * If you want something added to the repository, you create a PR (push
>   request, github terminology) or a MR (merge request, gitlab
>   terminology).  This essentially sets up a new, temporary git branch
>   that holds your submission.
> * You do `git push -f` again and again until this branch is in good
>   shape, i.e., the commit messages are OK, the reviewers are
>   satisfied, etc., etc.
> * Finally, you press the `Merge` button, which merges the branch and
>   by default also deletes this temporary git branch ??? such branches
>   are normally not meant to be retained.  Depending on the project,
>   this might also squash all commits of the branch into a single
>   commit before merging.

Yeah, this is super common because people want the official history
to be straight line.  Both for human (simple to understand) and
performance (a zillion nodes is slower).  We fixed the performance
problems in BitKeeper but didn't address the human problem.  There
is an easy fix that I called the "event stack".  It's a straight
line graph that records each tip in the integration repository.
So when Keith pushed his branch, that might have been 20 commits
on the branch, but it is only one node in the event stack.  I
had planned to have a "bk pop" command that popped off the last
push or commit.  

The idea is stuff like "git log" would tell you events and "git
log -v" would show you the real graph with all the nodes.

I implemented a hack version of this for Linus when he was using
BitKeeper so there was a way to pop off the last push if the crap
hit the fan.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]