'git request-pull' 和 'pull request' 之间的区别

Difference between 'git request-pull' and 'pull request'

什么是git request-pull and how does it compare to making a pull request, e.g. on github

1.应该如何使用?

2. 它可以用作拉取请求的替代品(例如 github)吗?

3.使用它有什么好处?

git request-pull 命令早于 托管服务。如评论中所述,它适用于倾向于包含 运行 git format-patchgit send-email 的工作流程,以通过电子邮件传递补丁。一旦补丁经过测试和批准,patch-generator 可能会在他们或他们的公司提供的 public 服务器上访问提交,并向项目维护者发送最终电子邮件消息,宣布他们拥有cleaned-up、rebased 等,project-topic 准备合并。

例如,假设一个名叫 Phil Systeme 的人有一个文件系统的 Linux 内核补丁。他有一个 Linux 内核树的克隆,从某个 Linux 版本开始。他的补丁包括对十几个文件的一次巨大提交,他将这些文件发送到 file-system 维护列表,主题行为:

PATCH: make the foo file system better

file-system 维护邮件列表的反馈首先说:将其分成至少六个较小的部分。 Phil Systeme 将他的 Phile System 补丁分成八个逻辑上更小的补丁,每个补丁都做一些有用的事情并且仍在构建。他这次发出了9条消息:

[PATCH v2 0/8]: make the foo file system better

(description of what the patch series is about)

[PATCH v2 1/8]: split up the xyzzy function

As a prerequisite for improving the foo file system, break
a large function into several smaller ones that each do one
thing.  We'll use this later to work better and add new features.

[PATCH v2 2/8]: ...

这一次,他得到的反馈说它看起来更好,但他忘记说明 ARM cpus 需要一个特殊的东西,而 MIPS CPU 需要一个不同的特殊东西。所以他发出了第三轮[PATCH v3 m/n]消息,依此类推。

最终,文件系统维护中尉同意这个补丁应该进入。现在 Phil,或中尉,将通过电子邮件发送的补丁转换为实际的 Git 提交,应用于当前的开发内核,或维护内核,或其他任何东西。 Linus Torvalds 在这一点上足够信任这个人,以至于这个人可以说: "here is a Git repository with new commits that you should add to the kernel." 然后 Linus 可以 git pull 直接从这个其他存储库,或者更有可能 git fetch 从那里决定是否以及如何合并它们,或者是否侮辱这个人。 :-)


像 GitHub 和 Bitbucket 这样的托管服务声称,或者感觉,或者你在这里喜欢的任何动词,他们的 "pull request" 机制优于所有这些电子邮件。在某些方面,很明显是这样;但是他们对隐藏实际 提交图 的热情对我来说有点神秘。

1. Pull Request 支持在 Web-UI[=23 上对给定代码库 的代码修改进行控制采用=],由托管商提供(例如 github、bitbucket)。 Example.

2. git request-pull 是一个 git 命令,它简化了 通过电子邮件 贡献补丁的过程,而无需取决于单个主机的服务。 Example.

+-----------------+--------------------------------+--------------------------+
|     Action      |           Pull Request         |       git request-pull   |
+-----------------+--------------------------------+--------------------------+
| authentication  |  Register and login at hoster  |  Full Name, Signed Email |
| description     |  Web-Ui                        |  Patch, Email            |
| discussion      |  Web-Ui                        |  Email, Mailinglist      |
| review          |  Web-Ui                        |  Email, Mailinglist      |
| adoption        |  One button `merge` action     |  git pull/push           |
+-----------------+--------------------------------+--------------------------+