From: Kai Blin <kai@samba.org>
To: git@vger.kernel.org
Subject: Directory renames without breaking git log.
Date: Wed, 3 Sep 2008 23:38:28 +0200 [thread overview]
Message-ID: <200809032338.35359.kai@samba.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 1654 bytes --]
Hi folks,
in an effort to make Samba development easier, we're trying to merge the
Samba3 and Samba4 branches into a single branch. In order to do so, we need
to rename the "source" directories both Samba 3 and Samba 4 have (we're
planning to use source3 and source4).
Unfortunately, the directories are big enough that git log stops to track the
renamed files, so e.g. git log ./samba3 does not show the samba3 history. The
history is not lost, of course, but it's way less intuitive to get it.
Here's how we merged the two branches:
$ mkdir samba-merged
$ cd samba-merged
$ git init
... (create COPYING, README and other top-level files, git add them)
$ git commit -m "Initial commit of merged samba"
$ git remote add git://git.samba.org/samba.git samba
$ git remote update
$ cp -a ~/samba3/source source3
$ cp -a ~/samba4/source source4
$ git add source3 source4
$ git write-tree
$ echo "merge branches" | git commit-tree <sha1 git write-tree retured> \
-p <sha1 of the initial commit> \
-p <sha1 of the current samba3 head> \
-p <sha1 of the current samba4 head>
$ git reset --hard <sha1 returned by git commit-tree>
$ git log
... history is there as expected
$ git log samba3
... history is just the merge commit
$ git log samba4
... history is just the merge commit
Is there any way to fix this that doesn't involve changing the history with
git-filter-branch?
Cheers,
Kai
--
Kai Blin
WorldForge developer http://www.worldforge.org/
Wine developer http://wiki.winehq.org/KaiBlin
Samba team member http://www.samba.org/samba/team/
--
Will code for cotton.
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next reply other threads:[~2008-09-03 22:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-03 21:38 Kai Blin [this message]
2008-09-04 0:16 ` Directory renames without breaking git log Tarmigan
[not found] ` <200809040853.36433.kai@samba.org>
2008-09-04 18:35 ` Tarmigan
2008-09-04 19:45 ` Kai Blin
2008-09-04 19:49 ` Junio C Hamano
2008-09-04 20:52 ` Kai Blin
2008-09-04 22:06 ` Junio C Hamano
2008-09-04 20:41 ` Jakub Narebski
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=200809032338.35359.kai@samba.org \
--to=kai@samba.org \
--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).