Re: git: uh-oh

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Haggerty <mhagger(at)alum(dot)mit(dot)edu>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, Max Bowsher <maxb(at)f2s(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: git: uh-oh
Date: 2010-09-07 17:16:41
Message-ID: 12765.1283879801@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Michael Haggerty <mhagger(at)alum(dot)mit(dot)edu> writes:
> Tom Lane wrote:
>> What I'd like is for those commits to vanish from the git log entirely.

> It seems to me that in your case such commits could be "grafted over":

> *---*---*---*
> \
> A---B---C---D

> E.g., if "C" is one of these special manufactured commits, then you
> could use git grafts to change the parent of "D" from "C" to "B", then
> bake in the change with "git filter-branch". This would make C
> inaccessible and subject to garbage collection.

Hmm, I see. This depends on the fact that git commits reference
filesystem states and not deltas, correct? So it does actually make
sense to just delete that commit from the history. I was concerned
that it'd invalidate later commits, but I guess it doesn't.

> But please check by hand to make sure that this makes sense; for
> example, it could be that other branches in the neighborhood make the
> excision impossible.

Since we weren't doing merging, nor branching off from back branches,
I'm having a hard time seeing how there'd be any risk there. Is there
a case I'm missing?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-09-07 17:30:54 Re: patch: tsearch - some memory diet
Previous Message Tom Lane 2010-09-07 17:11:55 Re: git: uh-oh