开发者

What do ++ and +- mean in a Debian diff file?

I'm currently viewing the Ubuntu Rhythmbox source diff, (you can view this via gzip -d < rhythmbox_0.12.8-0ubuntu6.diff.gz | less on the command line). Here's an excerpt:

+diff --git a/plugins/status-icon/status-icon-ui.xml b/plugins/status-icon/statu
s-icon-ui.xml
+index a5cb6e1..a4eee9d 100644
+--- a/plugins/status-icon/status-icon-ui.xml
++++ b/plugins/status-icon/status-icon-ui.xml
+@@ -15,12 +15,26 @@
+ 开发者_Go百科      <menuitem name="PreviousTray" action="ControlPrevious"/>
+       <menuitem name="NextTray" action="ControlNext"/>
+       <separator/>
+-      <menuitem name="ShowWindowTray" action="TrayShowWindow"/>
++      <menuitem name="ShowWindowTray" action="TrayToggleWindow"/>

There are several lines containing unfamiliar ++ and +- prefixes which I'm not familiar with. I suspect it has something to do with the git format, but can't find an explanation after some googling.

What does it mean? Is this specific to Debian diffs or git? Where can I find the definitive explanation for this format?


The first + means that it's a line added in the top diff. The + or - that follows is the first character in the line of the patch contained within the diff. So, you're looking at a diff within a diff.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜