From: Michael J Gruber <michaeljgruber+gmane@fastmail.fm>
To: git@vger.kernel.org
Subject: Re: RFC: grafts generalised
Date: Wed, 02 Jul 2008 18:43:22 +0200 [thread overview]
Message-ID: <g4gb7a$ket$1@ger.gmane.org> (raw)
In-Reply-To: <m3lk0kfdo1.fsf@localhost.localdomain>
Jakub Narebski venit, vidit, dixit 02.07.2008 18:35:
> "Stephen R. van den Berg" <srb@cuci.nl> writes:
>
>> I'm in the process of converting and stitching and patching vast amounts
>> of initially disjunct CVS and SVN repositories into larger complete
>> histories inside a single git repository. Recreating history as
>> accurately as possible.
>>
>> The problem I encounter is that any number of times I have to "edit"
>> history in a non-parameterable fashion, in any of the following ways:
>> - Change parents.
>> - Add merges.
>> - Change author, committer, commitdate, authordate.
>> - Change the tree (because of conversion errors in the automated
>> conversion process) belonging to a single commit.
>> - Retrofit a patch which has to ripple through all of history until
>> the present.
>>
>> The only things which are easily done at the moment are:
>> Change parents and add merges. This can be accomplished fairly easily
>> using the grafts file.
>> The other changes are messy at best and need to be parameterised into the
>> form of a shell script so that git filter-branch can have a go at it.
> [...]
>
>> I propose the following:
>> - Extend git fsck to do more sanity checks on the content of the grafts
>> file (to make it more difficult to shoot yourself in the foot with
>> that file; my feet will be grateful).
>> - Extend the grafts file format to support something like the following syntax:
>>
>> commit eb03813cdb999f25628784bb4f07b3f4c8bfe3f6
>> Parent: 7bc72e647d54c2f713160b22e2e08c39d86c7c28
>> Merge: 3b3da24960a82a479b9ad64affab50226df02abe 13b8f53e8ccec3b08eeb6515e6a10a2a
>> Merge: ac719ed37270558f21d89676fce97eab4469b0f1
>> Tree: 32fc99814b97322174dbe97ec320cf32314959e2
>> Author: Foo Bar (FooBar) <foo@bar>
>> AuthorDate: Sat Jun 6 13:50:44 1998 +0000
>> Commit: Foo Bar (FooBar) <foo@bar>
>> CommitDate: Sat Jun 7 13:50:44 1998 +0000
>> Logmessage: First line of logmessage override
>> Logmessage: Second line of logmessage override
>> Logmessage: Etc.
> [...]
>
> First, if I remember correctly (from KernelTrap and now defunct Kernel
> Traffic and one issue of Git Traffic) the 'graft' mechanizm was
> created so it would be possible to "graft" (join) historical
> conversion repository with the "current work" git repository (started
> from zero when git was deemed good enough for Linux kernel
> development). The same mechanism is used for shallow clone, where one
> goes in the opposite direction, shortening history instead of joining
> two repositories (two histories).
>
> The fact that git-filter-branch (and earlier cg-admin-rewrite-hist)
> respects grafts, and rewrites history so that grafts are no-op and are
> not needed further is a bit of side-effect. So I think that it would
> be better to provide generic git-filter-branch filter which can
> understand this "generalized grafts" file format, or rather
> 'description of changes' file. Put it in contrib/, and here you
> go...
>
Maybe the upcoming git-sequencer could be the appropriate place? It
tries to achieve just that: edit history by specifying a list of
commands. The currently planned set of commands would need to be
amended, but the framework should be in place.
Michael
next prev parent reply other threads:[~2008-07-02 16:44 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-02 14:35 RFC: grafts generalised Stephen R. van den Berg
2008-07-02 16:35 ` Jakub Narebski
2008-07-02 16:43 ` Michael J Gruber [this message]
2008-07-02 17:42 ` Stephen R. van den Berg
2008-07-02 18:25 ` Mike Hommey
2008-07-02 18:34 ` Michael J Gruber
2008-07-02 19:31 ` Stephan Beyer
2008-07-02 19:36 ` Stephan Beyer
2008-07-02 20:42 ` Dmitry Potapov
2008-07-02 23:46 ` Stephan Beyer
2008-07-03 6:05 ` Stephen R. van den Berg
2008-07-02 18:37 ` Stephen R. van den Berg
2008-07-07 6:28 ` Andreas Ericsson
2008-07-07 6:59 ` Stephen R. van den Berg
2008-07-02 17:32 ` Stephen R. van den Berg
2008-07-03 0:21 ` Petr Baudis
2008-07-03 7:11 ` Stephen R. van den Berg
2008-07-04 0:43 ` Jakub Narebski
2008-07-02 17:19 ` Dmitry Potapov
2008-07-02 17:58 ` Dmitry Potapov
2008-07-02 18:10 ` Stephen R. van den Berg
2008-07-02 18:33 ` Dmitry Potapov
2008-07-02 20:39 ` Dmitry Potapov
2008-07-02 21:18 ` Stephen R. van den Berg
2008-07-02 21:28 ` Avery Pennarun
2008-07-02 21:27 ` Junio C Hamano
2008-07-02 21:49 ` Junio C Hamano
2008-07-03 0:03 ` Junio C Hamano
2008-07-03 6:02 ` Johannes Sixt
2008-07-03 7:30 ` Stephen R. van den Berg
2008-07-03 7:42 ` Johannes Sixt
2008-07-03 9:37 ` Stephen R. van den Berg
2008-07-02 17:59 ` Stephen R. van den Berg
2008-07-03 0:13 ` Petr Baudis
2008-07-03 0:16 ` Petr Baudis
2008-07-03 0:28 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='g4gb7a$ket$1@ger.gmane.org' \
--to=michaeljgruber+gmane@fastmail.fm \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).