svn diff 或 git diff 中带有 at 符号的“@@...@@"元行是什么意思? [英] What does the “@@…@@” meta line with at signs in svn diff or git diff mean?

查看:48
本文介绍了svn diff 或 git diff 中带有 at 符号的“@@...@@"元行是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用 svn diffgit diff 时,它会显示如下几行:

@@ -1,5 +1,9 @@

它们是什么意思?

解决方案

那些被称为 (c)hunk 标头并包含范围信息.

它们被 @@ 符号包围.它们的格式为:

@@ -l,s +l,s @@

其中 l 是起始行号,s 是更改 (c)hunk 应用于每个文件的行数.- 表示原始文件,+ 表示新的(修改过的)文件.请注意,它不仅显示受影响的行,还显示上下文行.

-1,5 在原始文件中(由 - 表示).它表明第一行是开始和 5 个受影响的/上下文行

+1,9 在新的(修改的)文件中(由 + 表示),第一行再次是开始和 9 个受影响的/上下文行.

更多详情:http://en.wikipedia.org/wiki/Diff#Unified_format>

When I use svn diff or git diff it shows lines like:

@@ -1,5 +1,9 @@

What do they mean?

解决方案

Those are called (c)hunk headers and contain the range information.

They are surrounded by double at signs @@. They are of the format:

@@ -l,s +l,s @@

where l is the starting line number and s is the number of lines the change (c)hunk applies to for each respective file. The - indicates the original file and the + indicates the new (modified) file. Note that it not only shows affected lines, but also context lines.

The -1,5 is in the original file (indicated by the -). It shows that that first line is the start and 5 affected / context lines

The +1,9 is in the new (modified) file (indicated by the +) and again first line is the start and 9 affected / context lines.

More details here: http://en.wikipedia.org/wiki/Diff#Unified_format

这篇关于svn diff 或 git diff 中带有 at 符号的“@@...@@"元行是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆