Skip site navigation (1) Skip section navigation (2)

Re: git: uh-oh

From: Michael Haggerty <mhagger(at)alum(dot)mit(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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:05:39
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Tom Lane wrote:
> Magnus Hagander <magnus(at)hagander(dot)net> writes:
>> On Tue, Sep 7, 2010 at 17:07, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> Look for
>>>        This commit was manufactured by cvs2svn to create branch ...
>> Ok, found a bunch of those (78 to be exact). And the issue with them
>> is we want to change the commit author on them to be whomever made the
>> first commit on the branch *after* that?
> What I'd like is for those commits to vanish from the git log entirely.
> In a practical sense, what you should probably do is for each file
> mentioned in such a commit, cause the file's addition to the branch to
> become part of the first regular commit on the branch that touched that
> file.  In the CVS history, at least, there always is such a commit
> (since we never did the cvs tag -b thing).  I am not sure though whether
> the converted git history includes a touch of the file in that commit,
> if the version committed into the branch is identical to what was on
> HEAD.  Michael, can you comment on that point?

If the situation is a file that had a branch tag added to it after the
branch was first created, then there is a git commit corresponding to
that event that consists of the addition of that file with no history.
This commit might also include the addition of other files to the
branch, but should not include any file content changes.

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


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.

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.


In response to


pgsql-hackers by date

Next:From: Tom LaneDate: 2010-09-07 17:11:55
Subject: Re: git: uh-oh
Previous:From: Pavel StehuleDate: 2010-09-07 16:55:35
Subject: Re: proposal: tsearch dictionary initialization hook

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group