Skip to main content
added 234 characters in body
Source Link
Tim
  • 106.9k
  • 234
  • 651
  • 1.1k

From diffutils' manual

Next come one or more hunks of diff erences; each hunk shows one area where the files differ. Unified format hunks look like this:

@@ from-file-line-numbers to-file-line-numbers @@ line-from-either-file line-from-either-file... 

If a hunk contains just one line, only its start line number appears. Otherwise its line numbers look like ‘start,count’. An empty hunk is considered to start at the line that follows the hunk.

If a hunk and its context contain two or more lines, its line numbers look like ‘start,count’. Otherwise only its end line number appears. An empty hunk is considered to end at the line that precedes the hunk.

What do they mean? Could you also give some examples to show what they mean?

In particular, I couldn't tell the differences between the cases in the last two paragraphs. They seem to talk about the same cases but I suspect they don't. What do they mean? Could you also give some examples to show what they mean?

  • What is the difference between the "if" case in the first paragraph and the "otherwise" case in the second?

  • What is the difference between the "otherwise" case in the first paragraph and the "if" case in the second?

From diffutils' manual

Next come one or more hunks of diff erences; each hunk shows one area where the files differ. Unified format hunks look like this:

@@ from-file-line-numbers to-file-line-numbers @@ line-from-either-file line-from-either-file... 

If a hunk contains just one line, only its start line number appears. Otherwise its line numbers look like ‘start,count’. An empty hunk is considered to start at the line that follows the hunk.

If a hunk and its context contain two or more lines, its line numbers look like ‘start,count’. Otherwise only its end line number appears. An empty hunk is considered to end at the line that precedes the hunk.

I couldn't tell the differences between the cases in the last two paragraphs. They seem to talk about the same cases but I suspect they don't. What do they mean? Could you also give some examples to show what they mean?

From diffutils' manual

Next come one or more hunks of diff erences; each hunk shows one area where the files differ. Unified format hunks look like this:

@@ from-file-line-numbers to-file-line-numbers @@ line-from-either-file line-from-either-file... 

If a hunk contains just one line, only its start line number appears. Otherwise its line numbers look like ‘start,count’. An empty hunk is considered to start at the line that follows the hunk.

If a hunk and its context contain two or more lines, its line numbers look like ‘start,count’. Otherwise only its end line number appears. An empty hunk is considered to end at the line that precedes the hunk.

What do they mean? Could you also give some examples to show what they mean?

In particular, I couldn't tell the differences between the cases in the last two paragraphs. They seem to talk about the same cases but I suspect they don't.

  • What is the difference between the "if" case in the first paragraph and the "otherwise" case in the second?

  • What is the difference between the "otherwise" case in the first paragraph and the "if" case in the second?

deleted 7 characters in body
Source Link
Rui F Ribeiro
  • 58k
  • 28
  • 156
  • 239

From diffutils' manual

Next come one or more hunks of diff erences; each hunk shows one area where the files differ. Unified format hunks look like this:

@@ from-file-line-numbers to-file-line-numbers @@ line-from-either-file line-from-either-file... 

If a hunk contains just one line, only its start line number appears. Otherwise its line numbers look like ‘start,count’. An empty hunk is considered to start at the line that follows the hunk.

If a hunk and its context contain two or more lines, its line numbers look like ‘start,count’. Otherwise only its end line number appears. An empty hunk is considered to end at the line that precedes the hunk.

I couldn't tell the differences between the cases in the last two paragraphs. They seem to talk about the same cases but I suspect they don't. What do they mean? Could you also give some examples to show what they mean? Thanks.

From diffutils' manual

Next come one or more hunks of diff erences; each hunk shows one area where the files differ. Unified format hunks look like this:

@@ from-file-line-numbers to-file-line-numbers @@ line-from-either-file line-from-either-file... 

If a hunk contains just one line, only its start line number appears. Otherwise its line numbers look like ‘start,count’. An empty hunk is considered to start at the line that follows the hunk.

If a hunk and its context contain two or more lines, its line numbers look like ‘start,count’. Otherwise only its end line number appears. An empty hunk is considered to end at the line that precedes the hunk.

I couldn't tell the differences between the cases in the last two paragraphs. They seem to talk about the same cases but I suspect they don't. What do they mean? Could you also give some examples to show what they mean? Thanks.

From diffutils' manual

Next come one or more hunks of diff erences; each hunk shows one area where the files differ. Unified format hunks look like this:

@@ from-file-line-numbers to-file-line-numbers @@ line-from-either-file line-from-either-file... 

If a hunk contains just one line, only its start line number appears. Otherwise its line numbers look like ‘start,count’. An empty hunk is considered to start at the line that follows the hunk.

If a hunk and its context contain two or more lines, its line numbers look like ‘start,count’. Otherwise only its end line number appears. An empty hunk is considered to end at the line that precedes the hunk.

I couldn't tell the differences between the cases in the last two paragraphs. They seem to talk about the same cases but I suspect they don't. What do they mean? Could you also give some examples to show what they mean?

added 8 characters in body
Source Link
Tim
  • 106.9k
  • 234
  • 651
  • 1.1k

From diffutils' manual

Next come one or more hunks of diff erences; each hunk shows one area where the files differ. Unified format hunks look like this:

@@ from-file-line-numbers to-file-line-numbers @@ line-from-either-file line-from-either-file... 

If a hunk contains just one line, only its start line number appears. , only its start line number appears. Otherwise its line numbers look like ‘start,count’. An empty hunk is considered to start at the line that follows the hunk. its line numbers look like ‘start,count’. An empty hunk is considered to start at the line that follows the hunk.

If a hunk and its context contain two or more lines, its line numbers look like ‘start,count’. Otherwise only its end line number appears. An empty hunk is considered to end at the line that precedes the hunk., its line numbers look like ‘start,count’. Otherwise only its end line number appears. An empty hunk is considered to end at the line that precedes the hunk.

I couldn't tell the differences between the cases in the last two paragraphs. They seem to talk about the same cases but I suspect they don't. What do they mean? Could you also give some examples to show what they mean? Thanks.

From diffutils' manual

Next come one or more hunks of diff erences; each hunk shows one area where the files differ. Unified format hunks look like this:

@@ from-file-line-numbers to-file-line-numbers @@ line-from-either-file line-from-either-file... 

If a hunk contains just one line, only its start line number appears. Otherwise its line numbers look like ‘start,count’. An empty hunk is considered to start at the line that follows the hunk.

If a hunk and its context contain two or more lines, its line numbers look like ‘start,count’. Otherwise only its end line number appears. An empty hunk is considered to end at the line that precedes the hunk.

I couldn't tell the differences between the cases in the last two paragraphs. They seem to talk about the same cases but I suspect they don't. What do they mean? Could you also give some examples to show what they mean? Thanks.

From diffutils' manual

Next come one or more hunks of diff erences; each hunk shows one area where the files differ. Unified format hunks look like this:

@@ from-file-line-numbers to-file-line-numbers @@ line-from-either-file line-from-either-file... 

If a hunk contains just one line, only its start line number appears. Otherwise its line numbers look like ‘start,count’. An empty hunk is considered to start at the line that follows the hunk.

If a hunk and its context contain two or more lines, its line numbers look like ‘start,count’. Otherwise only its end line number appears. An empty hunk is considered to end at the line that precedes the hunk.

I couldn't tell the differences between the cases in the last two paragraphs. They seem to talk about the same cases but I suspect they don't. What do they mean? Could you also give some examples to show what they mean? Thanks.

edited tags
Link
Tim
  • 106.9k
  • 234
  • 651
  • 1.1k
Loading
Source Link
Tim
  • 106.9k
  • 234
  • 651
  • 1.1k
Loading