[cfe-dev] [Git] Introduction of llvm-project-subtree.git
NAKAMURA Takumi
geek4civic at gmail.com
Sun Nov 13 21:52:26 PST 2011
Hello guys,
I made the "subtree" all-in-one LLVM, clang, dragonegg &c repository.
https://github.com/chapuni/llvm-project
* How to play
1) git clone git://github.com/chapuni/llvm-project.git
2) (Optional) Add the line in [remote "origin"], .git/config
[remote "origin"]
fetch = +refs/notes/commits:refs/notes/commits
And "git fetch origin"
You can see like below;
commit a2010a39da6a56317fda432954aadafb8241e1a4
Author: NAKAMURA Takumi <geek4civic at gmail.com>
Date: Sun Nov 13 10:33:10 2011
Prune more RALinScan. RALinScan was also here!
Notes:
git-svn-rev: 144487
* What would be made happier with it?
- Fast pulling and checking-out
- Work with traditional llvm.git, clang.git &c. llvm-project.git
shares each root commit of subproject.
- Ability to bisect inter projects (eg. tracking clang-llvm
bi-dependent issues)
- (for developers) See below
* How to commit my changes via git-svn?
[Stupid way] On your clone of {llvm.git | clang.git &c),
$ git fetch /path/to/your/clone/of/llvm-project your-branch
$ git cherry-pick --strategy subtree FETCH_HEAD
[Smarter way] On your clone of {llvm.git | clang.git &c),
- add "/path/to/your/clone/of/llvm-project/.git/objects to
.git/objects/info/alternates
- git cherry-pick --strategy subtree (sha1 of commits on your branch)
* (WIP) Can I commit my inter-project changes?
Yes. For now, you can do manually.
1) Create temporary branch (may be detached)
2) Create a commit, that moves directory structure.
$ git mv llvm trunk; mkdir llvm; git mv trunk llvm
$ mkdir cfe; git mv clang cfe/trunk
$ git commit
3) $ git cherry-pick --strategy subtree (a commit of your branch)
4) $ git commit-diff -r HEAD HEAD^ HEAD https://llvm.org/svn/llvm-project/
* TODO
- Provide the script who commits llvm-project to
llvm.org/svn/llvm-project/ directly.
- Managing refs/tags/rXXXXXX corresponding to git-notes.
Happy happy hacking,
...Takumi
More information about the cfe-dev
mailing list