如何直接从 Linux 内核 GIT 存储库中区分文件? [英] How to Diff Files Directly from the Linux Kernel GIT Repository?
问题描述
我希望能够直接从 Linux 内核 GIT 存储库中区分文件/目录,而无需下载完整的源代码.
具体来说,我对两种可能的解决方案感兴趣:
- 能够通过网络浏览器 (firefox) 进行差异化
- 适用于 Ubuntu 的 GUI 实用程序,可以执行远程差异.
- 如何设置选项 #2 的教程
编辑
作为我正在寻找的示例,我曾经使用 CrossVC 作为CVS 存储库中的上述任务.
Gitweb 在内核.org 允许查看任意提交之间的差异,例如,参见以下链接了解 v2.6.32-rc6 和 v2.6.32-rc7 之间的差异: 不幸的是,官方 gitweb 版本(与 Git 本身一起分发)和 kernel.org 使用的 fork 都不会生成任意提交之间的链接,因此您必须手工制作(手工创建)URL 以提供给 gitweb.在 用于两个任意提交之间的差异(相当于命令行中的 用于同一文件的两个版本之间的差异(相当于 请注意,核心 gitweb(但不是 kernel.org 使用的 fork,目前)您可以使用 path_info 版本,例如: 如何找到它 在网页界面中找到一个提交,它是一个合并提交,例如 找到一个链接到提交和第二个父级之间的差异,例如 或生成补丁 (rawdiff) I'd like to be able to diff files / directories directly from the Linux Kernel GIT repository without having to download full source. Specifically, I'm interested in two potential solutions: Edit As an example of what I'm looking for, I used to use CrossVC for the above tasks on a CVS repo. Gitweb at kernel.org allows to view diff between arbitrary commits, see for example the following link for diff between v2.6.32-rc6 and v2.6.32-rc7: Unfortunately neither official gitweb version (distributed together with Git itself), nor the fork used by kernel.org generates links between arbitrary commits, so you would have to handcraft (create by hand) URLs to give to gitweb. In the case of For diff between two arbitrary commits (equivalent of For diff between two versions of the same file (equivalent of Note that core gitweb (but not the fork used by kernel.org, currently) you can use path_info version, e.g.: How to find it Find in a web interface a commit which is a merge commit, for example Find a link to diff between a commit and a second parent, for example Replace SHA-1 of compared commits with revision names or revision identifiers you want to compare, for example to generate diff between v3.15-rc8 and v3.15-rc7 or to generate patch (rawdiff)
这篇关于如何直接从 Linux 内核 GIT 存储库中区分文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;hp=refs/tags/v2.6.32-rc6;h=refs/tags/v2.6.32-rc7(使用 patch 链接以获得您可以应用的普通补丁),以及任意版本的文件之间/任意文件的任意版本之间,例如: commitdiff
视图(动作)的情况下,您需要的 iparameters 是 'h'
(哈希)和 'hp'
(哈希父级);在 blobdiff
视图的情况下,它们是 'hb
'(哈希基)和 'hpb'
(哈希父基),还有 'f'
(文件名)和 'fp
'(父文件).模板
git diff A B
)http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;hp=A;h=B
git diff A B
).http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blobdiff;f=
http://repo.or.cz/w/git.git/blobdiff/A..B:/<文件名>
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=1c5aefb5b12a90e29866c960a57c1f8f75def617
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/diff/?id=v3.15-rc8&id2=v3.15-rc7
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/rawdiff/?id=v3.15-rc8&id2=v3.15-rc7
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;hp=refs/tags/v2.6.32-rc6;h=refs/tags/v2.6.32-rc7
(use patch link to get plain patch that you can apply), and between arbitrary versions of file / between arbitrary versions of arbitrary files, e.g.: diff to current link in history view.commitdiff
view (action) the iparameters you need are 'h'
(hash) and 'hp'
(hash parent); in the case of blobdiff
view they are 'hb
' (hash base) and 'hpb'
(hash parent base), and also 'f'
(filename) and 'fp
' (file parent).Templates
git diff A B
from command line)
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;hp=A;h=B
git diff A B <filename>
).
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blobdiff;f=<filename>;hpb=A;hp=B
http://repo.or.cz/w/git.git/blobdiff/A..B:/<filename>
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=1c5aefb5b12a90e29866c960a57c1f8f75def617
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/diff/?id=1c5aefb5b12a90e29866c960a57c1f8f75def617&id2=54a217887a7b658e2650c3feff22756ab80c7339
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/diff/?id=v3.15-rc8&id2=v3.15-rc7
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/rawdiff/?id=v3.15-rc8&id2=v3.15-rc7