Re: [RFC][StGit PATCH] Add support for merge-friendly branches
- From
Karl Hasselström <kha@treskal.com>
- Date
- May 29, 2009, 07:20 UTC
- Message-ID
- <20090529072050.GA9760@diana.vm.bytemark.co.uk>
- In-Reply-To
- <b0943d9e0905280751k3b9f26c9gd907a7c11ca9d5e2@mail.gmail.com>
On 2009-05-28 15:51:20 +0100, Catalin Marinas wrote:
Show 11 quoted lines
> 2009/5/28 Catalin Marinas <catalin.marinas@gmail.com>: > > > 2009/5/28 Karl Hasselström <kha@treskal.com>: > > > > > This funcion should probably return a list of zero or more merge > > > bases. See the --all flag to git merge-base. > > > > OK, I'll add this and check the stack base against this set(list). > > What about this change to the original patch (it's faster to just > return the sha1 refs than building the Commit objects):
Creating Commit objects is really cheap---just look at the constructor. I made them that way on purpose, so that we'd never have to think twice about using Commit objects instead of passing sha1s around.
Also, you said "set", and I agree---the return value of get_mege_bases() should be a set. That's what it _is_, conceptually, and it makes little sense to obscure that fact.
--
Karl Hasselström, kha@treskal.com
www.treskal.com/kalle