A + indeed means a line is added, a - means a line is removed. A ! means a line has changed (although not every type of diff might use a !). Similarly, a > means a line has been added, and < means a line has been removed, they're more or less the same as + and -.

A .diff file really isn't very different from the 'open/find/edit' files phpBB used to provide. The only thing is that these phpBB update files were made with in mind that those files are all about updating. If you see a diff-file made with < and > markups, you see it's all about difference, and not necessarily about updating. It's just 'This is present in file 1, and not in file 2', and that's it. What you'll be doing with that information is up to you.
The - and + markup already has a notion of updating, although technically it is entirely the same as a markup with < and >.

Of course, you can update an installation with .diff-files, if you think of them as update-files. But you can do more with with diff-files than just updating, if you think of them in the broader sense as difference-files. Unfortunately, this broad applicability does make diff-files more cryptical then they need to be if you're just updating. These observations might be essential in understanding the difference between phpBB update files and .diff files.

To illustrate the similarities between the two methods, I'll provide some equivalent parts of patch files below, taken from two phpBB3.0 mods.

Yeah that's a tricky one... The following is what I think is the case, it might be I'm wrong on some subtle points, but I guess it's pretty accurate.

I reckon the 61 is the line number of the first line thats shown, in this case include($phpbb_root_path . 'includes/mcp/mcp_reports.' . $phpEx); (*). The -61 refers to where this line was in the old file, the +61 refers to where it is in the new file. In this case, the position hasn't moved. However, if there was a patch in the same file before this one, which adds 1 line, then this line will (of course) move down 1 line, so it will become @@ -61,6 +62,10 @@. (See (**) for a clarifying example.)

Furthermore, I guess the 6 and 10 refer to the number of lines that are shown by the diff before and after editting, respectively. (There are 10 lines, of which 4 are flagged with a +, so there were 6 lines before the update.)

As far as I know, these numbers are mainly present to help a patch-program identify the correct piece of code, in case a piece of code is present multiple times in the same file.

*= It might be nice to know that when using the patch application, a notice may be shown if the lines that are to be patched are found in your file, but on a different line-number than mentioned in the diff-file. Especially in modded applications (phpBB 3.0) these notices are not uncommon. They don't mess up your upgrade (they're only notices), but they do remind you of the fact that the files have changed with respect to a clean installation.

**= Below I include an example showing a more complicated case. There are two patches here, in the same file. The first patch adds 8 lines, and as such the second patch gains an offset of 8, moving from line 1846 to line 1854.

The fact that there is a diff for subsilver2 from 3.1 to 3.1.1 suggests that there is a subsilver2 for 3.1. But where do I find it? It's not included in phpBB3.1 and when I search on Google I only find subsilver2 for 3.0.x and a discussion about removing subsilver2 from 3.1. So what am I missing?

dskloet wrote:The fact that there is a diff for subsilver2 from 3.1 to 3.1.1 suggests that there is a subsilver2 for 3.1. But where do I find it? It's not included in phpBB3.1 and when I search on Google I only find subsilver2 for 3.0.x and a discussion about removing subsilver2 from 3.1. So what am I missing?

Lumpy Burgertushie wrote:I bow to your superior knowledge about this but all the research I did yesterday pointed to .diff files being related to being used from git and that all related to unix stuff.

Git is a version control system, is not related to linux. It was initialy created by Linus Toldvars (the guy that created the linux kernel), but is not related at all with the linux operative system. Git is the most popular version control system and is used worldwide for all type of developers. Github, the "social network" for developers where phpBB proyect is hosted, use git, that's why he posted a gitt diff file generated from the proyect repository.

I would swear that the other day I saw a post about the actual code changes from 3.0.12 to 3.0
however, I can't find it now. I see the article about creating styles but it is not very helpful for converting.

this would help a lot towards converting 3.0 styles over.

robert

I am available for custom work on a donation basis. Please send me a PM with your needs.