git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: Jakub Narebski <jnareb@gmail.com>,
	Christian Couder <chriscool@tuxfamily.org>
Cc: bill lam <cbill.lam@gmail.com>, git <git@vger.kernel.org>,
	Christian Couder <christian.couder@gmail.com>
Subject: Re: combine git repo historically
Date: Sun, 11 Oct 2009 15:07:06 +0200	[thread overview]
Message-ID: <200910111507.06926.j.sixt@viscovery.net> (raw)
In-Reply-To: <m31vlagvtw.fsf@localhost.localdomain>

On Sonntag, 11. Oktober 2009, Jakub Narebski wrote:
> Christian Couder <chriscool@tuxfamily.org> writes:
> > $ git checkout -b repo1-branch1 remote/repo1/branch1
> > $ git checkout N -- .
> > $ export GIT_AUTHOR_NAME=<author name of commit N>
> > $ export GIT_AUTHOR_EMAIL=<author email of commit N>
> > $ export GIT_AUTHOR_DATE=<date of commit N>
> > $ git commit -a

This would not preserver the committer, but in particular the committer date 
is rather important for history traversal. You really don't want to change 
it. I used a much more elaborate pipleine involving git-commit-tree because I 
did not think about this simple procedure:

>  $ git cat-file commit N > COMMIT_N
>[ $ edit COMMIT_N  ]
>  $ git hash-object -t commit -w COMMIT_N

Thanks for this tip, Jakub.

Christian, one thing that worries me is that 'git cat-file commit foo' returns 
the replacement (bar) instead of the original (foo). Is it intended? There is 
no way to retrieve the original commit using plumbing unless the replacement 
is removed. Am I right?

-- Hannes

  reply	other threads:[~2009-10-11 13:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-09  1:22 combine git repo historically bill lam
2009-10-09  6:02 ` Johannes Sixt
2009-10-09  7:40   ` Christian Couder
2009-10-10 14:03   ` bill lam
2009-10-11  2:36     ` Christian Couder
2009-10-11  4:06       ` bill lam
2009-10-11 10:11         ` Christian Couder
2009-10-11  8:48       ` Jakub Narebski
2009-10-11 13:07         ` Johannes Sixt [this message]
2009-10-11 13:43           ` Christian Couder
2009-10-11 14:29             ` Jakub Narebski
2009-10-11  9:34       ` Andreas Schwab

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=200910111507.06926.j.sixt@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=cbill.lam@gmail.com \
    --cc=chriscool@tuxfamily.org \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.com \
    /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).