tech-repository archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: irt: Re: Core statement on version control systems
On Mon, 22 Dec 2025 at 16:49, David Holland <dholland-tech%netbsd.org@localhost> wrote:
>
> On Tue, Dec 09, 2025 at 11:10:06AM -0500, Andrew Cagney wrote:
> > > > > :: - storing the identity of long-running branches in the history
> > > > > :
> > > > > : Can you expand on this?
> > > > >
> > > > > In git, you can find the merge commit, and it has two ancestors, and
> > > > > there's a diamond in the commit graph. But you can't tell from the
> > > > > repository metadata which side of the diamond was the trunk and which
> > > > > was the development branch. You have to read and interpret the commit
> > > > > messages. You also can't tell which development branch it was.
> > > >
> > > > I would just say that's what tags are for. :-)
> > >
> > > You can, but it's messy and you shouldn't have to.
> >
> > It's trivial. It's the first hash.
>
> Except when it's not.
How? A correctly configured upstream repo will reject the push.
Here's the text that was removed:
> If it isn't, someone snafu'd and forgot to block fox-trot merges inthe shared repo.
> See https://www.atlassian.com/blog/it-teams/stop-foxtrots-now and
> https://stackoverflow.com/questions/35962754/git-how-can-i-prevent-foxtrot-merges-in-my-master-branch/35962849#35962849
While we can't stop developers cutting their fingers, we can hand them
a bandaid so the blood flow is stemmed before it reaches upstream (to
be honest, cutting fingers is better then scrambling source trees like
is trivial with CVS)
> It's nice to think that nobody will ever stand
> on the wrong side by accdent when doing a merge; they will. Then it
> comes out backward. Also, some perfectly reasonable commit patterns
> produce what look like backward merges. For example, if you sync with
> head and then merge into master without remembering to commit
> something else on your branch first, the merge into master disappears
> and the only remaining merge is the "wrong" way around.
Assuming you can drive standard, have you ever tried doing a bunny
hop? When learning it was trivial, yet now it seems impossible; just
trying to describe what to do is confusing.
The above paragraph strikes me the same way. I suspect I know what is
happening, and at some point was doing the same thing myself, but it
is all so so long ago it just seems foreign, leaving me confused.
Especially when it's immaterial as the mess is rejected by upstream.
(anyway, type `git rebase`)
> --
> David A. Holland
> dholland%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index