周五给ext4发了一个patch但是Ted说无法apply
This patch didn’t apply since it was apparently against an older
version of the extents status patches. Here is the version after I
fixed it up so it would apply into the current ext4 tree.
因为我是在Linus tree上生成的patch,我就问了下倾向于使用哪个tree,没想到Ted给了一个非常详细的解释,对了解ext4开发/维护工作还挺有帮助的,摘录在此
The ext4 tree in general is the one which is preferred; the dev branch
is the tip of what we hope to push to Linus. At the moment, it’s in
final testing. The three branch pointers which are important on the
ext4 tree are origin, master, and dev. The origin branch is where we
have branched off of Linus’s tree. At the moment, ext4/origin is
pointing at v3.8-rc3. The ext4/master branch is always between origin
and dev (inclusive). The dev branch is a rewinding branch, which
means that everything between master and dev may be get modified
(i.e., to add a Reviewed-by: or to fix up some comments, etc.), or may
get dropped (if it turns out we discover the patch is not ready for
prime time). The dev branch is also what gets included into
linux-next.The master branch represents those patches which have been
“finalized”, which means once we bump the master branch, all of the
commits between origin and master (inclusive) are guaranteed not to
change. So for people who are building on top of master, it’s safe
for them to use git. For people who are building on top of dev, if
you want to make changes, it’s recommended you use a tool like quilt,
guilt, or stgit.Speaking of quilt/guilt, the set of patches between master and dev can
be found here:http://repo.or.cz/w/ext4-patch-queue.git
git://repo.or.cz/ext4-patch-queue.gitFor those people who are interested, or who want to more easily cherry
pick specific patches out of the ext4 patch queue, the ext4/dev branch
(usually, assuming I’ve remembered to update the ext4 patch queue
tree) can be reconstructed as follows:git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git ext4
mkdir -p ext4/.git/patches
cd ext4/.git/patches
git clone git://repo.or.cz/ext4-patch-queue.git dev
cd dev
sh timestamps
cd ../../..
git branch dev $(head -1 .git/patches/dev/series | sed -e ‘s/# BASE //’)
git checkout dev
guilt push stable-boundary
guilt pop(This assumes you are using guilt version v0.35, found at
git://repo.or.cz/guilt.git; note that the tip of the guilt tree has
incompatible changes in how they parse patches, so I haven’t upgraded
to the tip of guilt tree yet.)Anyway, most people will send me patches against Linus’s tree, and
that’s fine; if there are problems, I can usually fix up the patches.
But it’s most convenient for me if people send against either the
ext4/master, or most preferably, the ext4/dev branch.BTW, I’ve updated the ext4 wiki to include the above information.
Thanks,
– Ted
总结一下就是:
1. ext4 tree有三个branch,origin master dev
a) origin是从Linus tree分出来的点
b) master是稳定了的commit,打算下一次push给Linus的
c) dev是还不稳定/在测试的commit,可能会修改
d) 可以理解为 origin是起点,dev是终点,master用作一个标尺,origin-master之间是的commit是稳定的,可以提交给Linus的,master-dev之间是还在开发/测试的commit,一旦稳定了就更新master,把新commit包含进去
2. 很多人在Linus tree上生成patch,这没问题,Ted如果遇到不能apply的情况他会修复
3. 使用master或者dev分支更对Ted来说更方便,他更倾向于dev分支
4. 用dev分支的话Ted推荐使用guilt/quilt等工具,用master分支用git就行
git还没那么熟悉,还不会灵活使用各种分支和patch管理工具,前路漫漫啊。