Re: git: uh-oh - Mailing list pgsql-hackers

From Tom Lane
Subject Re: git: uh-oh
Date
Msg-id 12765.1283879801@sss.pgh.pa.us
Whole thread Raw
In response to Re: git: uh-oh  (Michael Haggerty <mhagger@alum.mit.edu>)
Responses Re: git: uh-oh  (Max Bowsher <maxb@f2s.com>)
List pgsql-hackers
Michael Haggerty <mhagger@alum.mit.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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: git: uh-oh
Next
From: Tom Lane
Date:
Subject: Re: patch: tsearch - some memory diet