Cla*_*bel 523 git git-commit
Git中的Sign Off功能有什么意义?
git commit --signoff
Run Code Online (Sandbox Code Playgroud)
我什么时候应该使用它,如果有的话?
Bri*_*ell 499
签名是将补丁纳入Linux内核和其他一些项目的要求,但大多数项目实际上并没有使用它.
它是在SCO诉讼之后引入的(以及其他指控SCO侵犯版权的指控,其中大部分都是他们从未真正上过庭),作为开发者原产地证书.它用于表示您证明您已经创建了相关的补丁,或者您根据自己的知识证明了它,它是在适当的开源许可下创建的,或者是由某人提供给您的除此之外的其他条款.这有助于建立一系列负责相关代码版权状态的人员,以帮助确保未在适当的免费软件(开源)许可下发布的受版权保护的代码不包含在内核中.
And*_*ann 65
签名是提交消息末尾的一行,用于证明谁是提交的作者.其主要目的是改善对谁做了什么的追踪,尤其是补丁.
提交示例:
Add tests to statement printer.
Signed-off-by: Super Developer <super.dev@gmail.com>
Run Code Online (Sandbox Code Playgroud)
如果用于开源项目,它应包含用户真实姓名.
如果分支维护者需要稍微修改补丁以便合并它们,他可以要求提交者重新启动,但这会适得其反.他可以调整代码并在最后签名,以便作者仍然可以获得补丁,而不是引入的错误.
Add tests to statement printer.
Signed-off-by: Super Developer <super.dev@gmail.com>
[uber.dev@gmail.com: Renamed test methods according to naming convention.]
Signed-off-by: Uber Developer <uber.dev@gmail.com>
Run Code Online (Sandbox Code Playgroud)
资料来源:http://gerrit.googlecode.com/svn/documentation/2.0/user-signedoffby.html
Von*_*onC 28
git 2.1.1(2016年2月)澄清了在承诺b2c150d(2016年1月5日)由David A. Wheeler(david-a-wheeler
).
(由Junio C gitster
Hamano合并- -在提交7aae9ba,2016年2月5日)
git commit
手册页现在包括:
-s::
--signoff::
Run Code Online (Sandbox Code Playgroud)
Signed-off-by
在提交日志消息的末尾由提交者添加行.
签收的含义取决于项目,但它通常证明提交者有权在同一许可下提交此工作并同意开发人员原产地证书(有关更多信息,请参阅https://developercertificate.org).
展开文档描述
--signoff
修改各种文档(手册页)文件以更详细地解释什么
--signoff
意思.这得益于" 失败的文章'Bottomley:关于DCO的一个温和的提议' "(开发者证书原产地),paulj指出:
我有DCO的问题是,有添加"
-s
"参数git的承诺并不真正意味着你甚至听到了DCO的(该git commit
手册页只字不提DCO的任何地方),别提真正见过它.那么"
signed-off-by
"以任何方式存在意味着发送者是否同意并承诺DCO?结合我已经看到的列表上的回复没有SOB的补丁,只是说"重新发送这个,signed-off-by
所以我可以提交它".扩展git的文档将使人们更容易争辩说开发人员
--signoff
在使用它时会理解.
请注意,此签收现在(对于Git 2.15.x/2.16,2018年第一季度)也可用git pull
.
见W. Trevor King()提交3a4d2c7(2017年10月12日).(由Junio C Hamano合并- -在提交fb4cd88,2017年11月6日)wking
gitster
pull
:传递--signoff/--no-signoff
给"git merge
"合并可以采取
--signoff
,但没有拉--signoff
下来,使用起来不方便; 允许'pull
'采取选择并通过它.
Gui*_*ern 15
这个问题有一些很好的答案.我将尝试添加更广泛的答案,即关于当前实践中这些类型的行/标题/预告片的内容.特别是签字标题(不是唯一的标题).
在Git和Linux等项目的当前实践中,像"签字"(↑2)这样的标题或预告片(↑1)是提交的有效结构化元数据.这些都附加到提交消息的末尾,在消息正文的"自由格式"(非结构化)部分之后.这些是令牌值(或键值)对,通常由冒号和空格(:?
)分隔.
就像我提到的那样,"签字"并不是当前实践中唯一的预告片.例如,参见此提交,它与"Dirty Cow"有关:
mm: remove gup_flags FOLL_WRITE games from __get_user_pages()
This is an ancient bug that was actually attempted to be fixed once
(badly) by me eleven years ago in commit 4ceb5db9757a ("Fix
get_user_pages() race for write access") but that was then undone due to
problems on s390 by commit f33ea7f404e5 ("fix get_user_pages bug").
In the meantime, the s390 situation has long been fixed, and we can now
fix it by checking the pte_dirty() bit properly (and do it better). The
s390 dirty bit was implemented in abf09bed3cce ("s390/mm: implement
software dirty bits") which made it into v3.9. Earlier kernels will
have to look at the page state itself.
Also, the VM has become more scalable, and what used a purely
theoretical race back then has become easier to trigger.
To fix it, we introduce a new internal FOLL_COW flag to mark the "yes,
we already did a COW" rather than play racy games with FOLL_WRITE that
is very fundamental, and then use the pte dirty flag to validate that
the FOLL_COW flag is still valid.
Reported-and-tested-by: Phil "not Paul" Oester <kernel@linuxace.com>
Acked-by: Hugh Dickins <hughd@google.com>
Reviewed-by: Michal Hocko <mhocko@suse.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Willy Tarreau <w@1wt.eu>
Cc: Nick Piggin <npiggin@gmail.com>
Cc: Greg Thelen <gthelen@google.com>
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Run Code Online (Sandbox Code Playgroud)
除了上面的"签收"预告片外,还有:
其他项目,例如Gerrit,有自己的标题和相关的含义.
请参阅:https://git.wiki.kernel.org/index.php/CommitMessageConventions
我的印象是,虽然这个特定元数据的最初动机是一些法律问题(从其他答案判断),但这种元数据的实践已经超越了处理形成一系列作者链的情况.
[↑1]:man git-interpret-trailers
[↑2]:这些有时候也被称为"呜咽"(姓名首字母).
归档时间: |
|
查看次数: |
132756 次 |
最近记录: |