git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Directory renames without breaking git log.
@ 2008-09-03 21:38 Kai Blin
  2008-09-04  0:16 ` Tarmigan
  0 siblings, 1 reply; 8+ messages in thread
From: Kai Blin @ 2008-09-03 21:38 UTC (permalink / raw)
  To: git

[-- 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 --]

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

end of thread, other threads:[~2008-09-04 22:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-03 21:38 Directory renames without breaking git log Kai Blin
2008-09-04  0:16 ` 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

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