git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RFC: grafts generalised
@ 2008-07-02 14:35 Stephen R. van den Berg
  2008-07-02 16:35 ` Jakub Narebski
                   ` (2 more replies)
  0 siblings, 3 replies; 36+ messages in thread
From: Stephen R. van den Berg @ 2008-07-02 14:35 UTC (permalink / raw)
  To: git

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.
This parameterisation is doable for author/committer/dates in most cases
(but not pretty), but is rather (too) convoluted for ripple-through
patches.

You have to imagine that the whole tree has lots of interconnects
already (merges), and changing the tree at a point in history which has
to ripple through is a mess, because all references and interconnects
need to be rewritten as well.

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.
 
- Whereas not specified fields default to not altering the commit for
  those fields.
  E.g.

commit eb03813cdb999f25628784bb4f07b3f4c8bfe3f6
Parent: 7bc72e647d54c2f713160b22e2e08c39d86c7c28

  Would alter just the parent, nothing else.
- Keep backward compatibility with the old format.

Obviously, the use case for this is to change the tree as needed, then
run git filter-branch to actually get things in permanently, after which
it becomes clonable.
-- 
Sincerely,
           Stephen R. van den Berg.

You are confused; but this is your normal state.

^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2008-07-07  7:00 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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).