From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Johannes Sixt <J.Sixt@eudaptics.com>
Cc: git@vger.kernel.org
Subject: Re: Embedded Linux development with GIT
Date: Thu, 5 Jul 2007 13:00:26 +0100 (BST) [thread overview]
Message-ID: <Pine.LNX.4.64.0707051253130.9789@racer.site> (raw)
In-Reply-To: <468C996B.7FEFEB29@eudaptics.com>
Hi,
On Thu, 5 Jul 2007, Johannes Sixt wrote:
> Sean Kelley wrote:
> >
> > I have a situation where we have a local GIT repository that is based
> > on v2.6.17. We initially added the source tarball to an empty
> > repository and then started applying changes to it. Looking back,
> > that might not have been the best idea 400 commits later.
>
> That is possible using a graft:
>
> $ echo "$x $(git rev-parse v2.6.17^0)" >> .git/info/grafts
>
> where $x is the SHA1 of the first commit you made on top of the imported
> tarball.
Yes, this is also how I would do it.
> This way you have spliced your history with Linus's history. (This is a
> strictly _local_ matter! Every clone of your history must repeat the
> game!)
Now, here I disagree slightly. If you merge just once, subsequent merges
will be possible even without that graft.
So if you merge with some newer Linux version, all your cloners get the
benefit.
> Now, Linus will not be able to pull from your faked history because he
> doesn't know about the graft.
Except if you merge with a more recent version of Linux.
However, I doubt that such a distant (in terms of time!) merge would
appeal to Linus. I guess you have to rebase on top of Linus' version
_anyway_.
> In order to fix that, you can run git-filter-branch from current git's
> master branch to rewrite your history:
>
> $ git filter-branch new-master v2.6.17..master
>
> Read the man page of git-filter-branch, and understand the implications
> before you publish the result.
This is a way to fix your history, yes. Note that filter-branch is not
yet in an official release of Git, and so you either have to wait for
1.5.3, or you get filter-branch from git.git's "next" branch (just picking
this one script should work fine, if you have at least 1.5.1 installed).
Note that this rewrites the history, so all the disadvantages of
rebasing with pulling apply here, too.
But as stated above, I think you have to rebase eventually anyway, if you
go for inclusion in Linus' tree. In that case, the filter-branch is
unnecessary.
Ciao,
Dscho
next prev parent reply other threads:[~2007-07-05 12:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-05 5:50 Embedded Linux development with GIT Sean Kelley
2007-07-05 6:06 ` Dan Chokola
2007-07-05 6:53 ` Alex Riesen
2007-07-05 7:10 ` Johannes Sixt
2007-07-05 12:00 ` Johannes Schindelin [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-07-05 12:31 linux
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=Pine.LNX.4.64.0707051253130.9789@racer.site \
--to=johannes.schindelin@gmx.de \
--cc=J.Sixt@eudaptics.com \
--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).