Re: git: uh-oh

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

On 07/09/10 18:16, Tom Lane wrote:
> 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.

It wouldn't - except for the fact that cvs2git batches such manufactured
commits such that there is no guarantee that a single manufactured
commit pertains only to files in the commit immediately afterwards. For
example, consider the it.po file in the commit referenced in this thread
yesterday:

commit b36518cb880bb236496ec3e505ede4001ce56157
Author: PostgreSQL Daemon <webmaster(at)postgresql(dot)org>
Date: Sun Feb 28 21:32:02 2010 +0000

This commit was manufactured by cvs2svn to create branch
'REL8_4_STABLE'.

Cherrypick from master 2010-02-28 21:31:57 UTC Tom Lane
<tgl(at)sss(dot)pgh(dot)pa(dot)us> 'Fix up memory management problems in contrib/xml2.':
contrib/xml2/expected/xml2.out
contrib/xml2/sql/xml2.sql
src/bin/pg_dump/po/it.po

Max.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-09-07 18:27:36 Re: Synchronous replication - patch status inquiry
Previous Message Simon Riggs 2010-09-07 18:15:43 Re: Synchronous replication - patch status inquiry