This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Merging glibc-ports repo


Hi,

A while ago there was some discussion about merging the glibc-ports back
into glibc under ports/ post 2.16 [1].  In that thread there is a guide
on how to do this preserving history [2].  While the history is present
after this, commands like "git blame" and "git log --follow" no longer work.

[1] http://sourceware.org/ml/libc-alpha/2012-04/msg00583.html
[2] http://sourceware.org/ml/libc-alpha/2012-04/msg00596.html


I have worked through how to do the merge and keep all commit history so
that "git blame" and "git log --follow" work.


Firstly, we need to prepare glibc-ports:

git clone git://sourceware.org/git/glibc-ports.git
cd glibc-ports
mkdir ports
git mv Banner ChangeLog* data/ Makefile README sysdeps/ ports
git commit -a -m "Move all files into ports/ subdirectory in preparation
for merge with glibc"
git push

At the stage, the glibc-ports repo should be closed for further commits.


Then we do the merge into glibc:

git clone git://sourceware.org/git/glibc.git
cd glibc
git remote add -f ports git://sourceware.org/git/glibc-ports.git
git merge -s ours --no-commit ports/master
git read-tree --prefix=TMP/ -u ports/master
git mv TMP/ports .
git rm -f TMP/.gitignore
git commit -m "Merge glibc-ports into ports/ directory"
git push


Once that is done, you can verify the glibc-ports history is present in
glibc repo visually by looking at "gitk" and seeing "git blame
ports/<file>" works.  Because the files have been moved to be under the
ports/ directory commands like "git log" need to use the "--follow" flag.


Would it be worthwhile for me to create a wiki page with details of this
merge?

Allan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]