Re: git: uh-oh
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Haggerty <mhagger@alum.mit.edu>
Cc: Magnus Hagander <magnus@hagander.net>, Max Bowsher <maxb@f2s.com>, Robert Haas <robertmhaas@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2010-09-07T17:16:41Z
Lists: 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