git 什么是被子补丁集?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/766759/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 03:39:13  来源:igfitidea点击:

What is a quilt patchset?

gitquilt

提问by nohat

There is a git command called git-quiltimport. Its man pages says it "Applies a quilt patchset onto the current git branch, preserving the patch boundaries, patch order, and patch descriptions present in the quilt patchset."

有一个名为git-quiltimport的 git 命令。它的手册页说它“将 quilt 补丁集应用到当前的 git 分支,保留补丁边界、补丁顺序和存在于 quilt 补丁集中的补丁描述。”

However, it doesn't define what a "quilt patchset" is. What is a "quilt patchset"?

但是,它没有定义“被子补丁集”是什么。什么是“被子补丁集”?

回答by Kai

Quilt is a patch managing tool. The idea is that it makes it easier for you to maintain multiple, discrete sets of changes in a single source client, even if they touch the same files.

Quilt 是一个补丁管理工具。这个想法是它使您可以更轻松地在单个源客户端中维护多个离散的更改集,即使它们涉及相同的文件。

The official siteis sparse on details, but worth if you are thinking of using it.

官方网站上的详细信息很少,但值得如果你正在考虑使用它。

If you didn't use quilt, you would probably just have to create another client to maintain the separate change sets, but you would have to patch back and forth changes that would benefit both client source trees.

如果您不使用 quilt,您可能只需要创建另一个客户端来维护单独的更改集,但是您必须来回修补对两个客户端源代码树都有益的更改。

回答by Brian Gianforcaro

A quilt patchset is a special patch series designed for use with the Quilt toolkit.

被子补丁集是一个特殊的补丁系列,专为与被子工具包一起使用而设计。

Quilt

被子

Quilt is essentially a patch management toolkit. Where it differs from git is that it has no permanent history: The patches themselves can have a de- scription ?eld which usually equates to the commit meta-data in git. Where quilt differs from git is in the anchoring of the patch set (quilt is simply a series of patches above an extracted source base, without any de?nitive identi?cation of the actual source base being patched).

Quilt 本质上是一个补丁管理工具包。它与 git 的不同之处在于它没有永久的历史记录:补丁本身可以有一个描述字段,它通常等同于 git 中的提交元数据。quilt 与 git 的不同之处在于补丁集的锚定(quilt 只是在提取的源库之上的一系列补丁,没有对被修补的实际源库的任何明确标识)。

Git, Quilt and Other Kernel Maintenance Tools (PDF)

Git、Quilt 和其他内核维护工具 (PDF)

回答by Shannon Nelson

A quilt patchset is a set of patches that were managed and put together by quilt.

quilt 补丁集是由 quilt 管理和组合的一组补丁。

A patchset is a group of patches that can be applied to a set of files - these files may be code, documention, data, or whatever, usually text of some sort. The actual patch is a text file that defines the changes to be made from the original to create the new version, usually generated by using the program 'diff'. The patchset is a collections of those diff outputs, each is usually a logical step in the change process.

补丁集是一组可以应用于一组文件的补丁——这些文件可以是代码、文档、数据或其他任何东西,通常是某种文本。实际补丁是一个文本文件,它定义了从原始版本进行的更改以创建新版本,通常使用程序“diff”生成。补丁集是这些差异输出的集合,每个输出通常是更改过程中的一个逻辑步骤。

Quilt is a program that can manage many patches over large set of files. It can be used to create the patch files, to select which patch files to be applied, to export those patches for others to use, and to import patches from elsewhere.

Quilt 是一个可以管理大量文件中的许多补丁的程序。它可用于创建补丁文件、选择要应用的补丁文件、导出这些补丁供其他人使用以及从其他地方导入补丁。

For more info on using patch and diff, check here: The Ten Minute Guide to diff and patch

有关使用补丁和差异的更多信息,请查看此处: 差异和补丁十分钟指南

For quilt info, try these: Quilt, a patch management system, quilt manpage, and the Quilt project page

有关 quilt 信息,请尝试以下这些: Quilt、补丁管理系统quilt 联机帮助页Quilt 项目页面

回答by Dan Fabulich

Quiltis a very lightweight SCM tool, like Git, Subversion, or Mercurial. quiltimportlets you import from Quilt into Git.

Quilt是一个非常轻量级的 SCM 工具,类似于 Git、Subversion 或 Mercurial。quiltimport让你从 Quilt 导入 Git。

Very few people use Quilt. Unless you have legacy Quilt patches lying around, you probably have no need for quiltimport. Specifically, if you're happy with Git, there's no reason to adopt Quilt.

很少有人使用 Quilt。除非您有遗留的 Quilt 补丁,否则您可能不需要quiltimport. 具体来说,如果您对 Git 感到满意,就没有理由采用 Quilt。

(The quilt.pdf in Quilt's docs suggest you might prefer Quilt if you don't want to pay the "overhead" of a more heavyweight version control system when you only need a small fraction of its functionality.)

(Quilt 文档中的 quilt.pdf 建议您可能更喜欢 Quilt,如果您不想在只需要其一小部分功能的情况下为更重量级的版本控制系统支付“开销”。)

回答by VonC

If you consider a patch set as a set of patches to be applied, git 2.7 will do a better job to distinguish the patch set (a folder with patches) from the file 'series' (a file that gives an ordered list of patches to apply).

如果您将补丁集视为要应用的补丁集,则 git 2.7 将更好地将补丁集(带有补丁的文件夹)与文件“系列”(一个提供补丁有序列表的文件)区分开来。申请)。

See commit ff60ffd(31 Aug 2015) by Juerg Haefliger.

请参阅Juerg Haefliger提交的 ff60ffd(2015 年 8 月 31 日)。

(Merged by Junio C Hamano -- gitster--in commit db9789a, 05 Oct 2015)

(由Junio C gitsterHamano合并-- --提交 db9789a 中,2015 年 10 月 5 日)

git-quiltimport: add commandline option --series <file>

The quilt series file doesn't have to be located in the same directory with the patches and can be named differently than 'series' as well.
This patch adds a commandline option to allow for a non-standard series filename and location.

git-quiltimport: 添加命令行选项 --series <file>

被子系列文件不必与补丁位于同一目录中,也可以与“ series”不同地命名。
此补丁添加了一个命令行选项以允许非标准系列文件名和位置。

The new option is:

新选项是:

--series <file>:

The quilt series file.

The default for the series file is <patches>/seriesor the value of the $QUILT_SERIES environment variable.

被子系列文件。

系列文件的默认<patches>/series值是 $QUILT_SERIES 环境变量的值。



Note: with Git 2.21 (Q1 2019) adds "--keep-non-patch" option.
See commit 1eadaa3(12 Dec 2018) by Laura Abbott (labbott).
(Merged by Junio C Hamano -- gitster--in commit 9c51ad5, 18 Jan 2019)

注意:在 Git 2.21(2019 年第一季度)中添加了“ --keep-non-patch”选项。
请参阅Laura Abbott ( ) 的commit 1eadaa3(2018 年 12 月 12 日(由Junio C Hamano合并-- --提交 9c51ad5 中,2019 年 1 月 18 日)labbott
gitster

git amhas the --keep-non-patchoptionto pass -bto gi mailinfofor keeping subject prefixes intact.
Allow this option to be used with quiltimportas well.

git am可以--keep-non-patch选择传递-bgi mailinfo以保持主题前缀完整
也允许使用此选项quiltimport