David Christensen <da...@endpoint.com> writes:
> On Sep 26, 2010, at 2:24 PM, Tom Lane wrote:
>> We could perhaps fix that if there were an inexpensive way to get the
>> SHA1 of the master commit that each branch is sprouted from.

> Particularly with PostgreSQL's linear branch history, `git merge-base` will 
> show you the point at which the branches diverged from master:

> $ git merge-base origin/REL9_0_STABLE master
> 1084f317702e1a039696ab8a37caf900e55ec8f2

Ah-hah, I figured there had to be some plumbing command that would get that.
The current version of the script siphons the information off from git
log --parents, but it'd likely be cleaner to do it with git merge-base.
It might be a bit slower though --- some experimentation here says that
git merge-base takes a bit of time, which isn't surprising if I'm right
in guessing that it has to chase back from the two branch heads looking
for a commit in common.  That's going to basically duplicate work that
git log has to do also.

                        regards, tom lane

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to