News for hackers. Stuff that matters.
Re:Git Reflow by CJefferson on Thursday May 19, 2016 @02:51PM (#11732675)
I agree, I wish some VCS would figure out how to do a "history of history". I hate every time in git I destroy history (delete a branch, do a force push / update), but it is almost impossible to use git without doing these things, particularly when committing to another project.
Re:Git Reflow by jordigh on Thursday May 19, 2016 @03:43PM (#11733125)
We did figure it out, that's Mercurial Evolve:

https://www.mercurial-scm.org/doc/evolution/sharing.html

Re:Git Reflow by amk_ on Thursday May 19, 2016 @06:48PM (#11734461)
Re:Git Reflow by jordigh on Friday May 20, 2016 @01:27PM (#11739717)
That's not the same thing as a metahistory. It doesn't tell you which commit(s) replaces with commit(s). Mercurial Evolve, for example, will record if a commit was split into several commits or if a commit was folded (squashed) into a single commit. Thus you can trace the history of a commit as it, well, evolves. You can't easily do this with git reflog, because it doesn't store that information.
Re:Git Reflow by amk_ on Sunday May 22, 2016 @02:26PM (#11749642)
> because it doesn't store that information

Is there something about the Hg architecture that makes it easier to plug in something like Evolve than with Git? Evolve isn't enabled out of the box on Mercurial either.

Re:Git Reflow by jordigh on Sunday May 22, 2016 @03:17PM (#11749851)
All of the actual infrastructure for evolve is actually in hg core. This is the obsolescence markers and the logic for hiding obsolete commits. This infrastructure makes it so that all hg commands see a filtered set of commits if any are obsolete and "unreferenced" (hg doesn't really find commits by referencing, but the logic for when an obsolete commit is hidden is similar to git's referencing logic).

The "only" thing the Evolve extension does is expose a UI for creating and manipulating obsolete commits, but it's not the only extension that does it.

So, I guess you could build Evolve for git, if you absolutely cannot be persuaded to use anything but git. You would need to build obsolescence markers, and the proper logic for exchanging them between clones. Getting this right has taken a lot of work for hg, but maybe now that the ideas are mostly there, it would be easy to replicate them.