[Development] Proposal: New branch model

Thiago Macieira thiago.macieira at intel.com
Wed Jan 23 18:49:46 CET 2019


On Wednesday, 23 January 2019 08:37:57 PST Konstantin Tokarev wrote:
> >   Disadvantages:
> >   - git history would be a bit wilder, "git branch --contains" would not
> >   work
> >   - commit messages in some branches would have kind of ugly footer as an
> > 
> > effect of "cherry-pick -x"
> 
> Gerrit's Change-Id can be used to track presence of patch in branches of
> interest

Yes, but not as easily, since the git branch --contains and git tag --contains 
are pure DAG operations. The search you're talking about is a text search 
(usually implemented by a regexp search) on the commit message, with no DAG 
boundaries. You have to scan all valid branches for a given string.

And then you still have to run git branch --contains on each entry you found 
to figure out which branches contain those commits.

So this is scriptable. It's going to be something like 100x slower than today, 
but it should still finish within 10 seconds, even on slow machines.

Test in qtbase (Linux):
Run: git rev-list --grep=5d809703aa2d2a08ae7e9610fd42025b081d3d0c --all
Output: bd38ff3c5456b1f2fc03e4899e73d650ad5f858a
Runtime: 0,52s user 0,03s system 99% cpu 0,555 total

Same test on Windows: real    0m0.800s, user    0m0.593s, sys     0m0.171s

(Both machines are Intel Skylakes, and both have SSDs and 16 GB of RAM)

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center






More information about the Development mailing list