“@@”在补丁/差异(linux)中?
我对 Linux 补丁和 diff 非常陌生。我正在尝试编辑补丁,但出现了一些错误,我必须修复它们。
我遇到过: @@ -11,7 +11,6 @@
在补丁(diff)文件中多次出现,我认为第一组数字代表起始行号和要编辑的行数,但是第二组代表什么?
I'm really new to linux patches and diff. I'm trying to edit a patch and there's some errors and I have to fix them.
I've come across:
@@ -11,7 +11,6 @@
many times in the patch (diff) file and I think the first set of numbers represent the starting line number and number of lines to be edited, but what does the second set represent?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
它们是生成的起始行和生成的块中的行数。
They're the resultant starting line and the number of lines in the resultant chunk.
请注意,编辑差异非常脆弱。如果您更改任何块中任何位置的行数,则会破坏差异,除非您还更新块和行号。
Beware that editing a diff is very fragile. If you change the number of lines anywhere in any chunk, you'll break the diff unless you also update the chunks and line numbers.