nerdexam
Cisco

200-901 · Question #3

Which line is an example of the start of a chunk from a unified diff?

The correct answer is D. @@ -88,10 +88,6 @@. A unified diff chunk header (hunk header) follows the strict format: @@ -<start>,<count> +<start>,<count> @@. The minus side (-) represents the original file and the plus side (+) represents the new file, both using line numbers and line counts. Option D (@@ -88,10 +88,6 @@)…

Software Development and Design

Question

Which line is an example of the start of a chunk from a unified diff?

Options

  • A@@ -90,88 +20191008T1349@@
  • B@@ -20191007T1200 +88,90 @@
  • C@@ -20191007T1200 +20191008T1349@@
  • D@@ -88,10 +88,6 @@

How the community answered

(38 responses)
  • B
    3% (1)
  • C
    5% (2)
  • D
    92% (35)

Explanation

A unified diff chunk header (hunk header) follows the strict format: @@ -<start>,<count> +<start>,<count> @@. The minus side (-) represents the original file and the plus side (+) represents the new file, both using line numbers and line counts. Option D (@@ -88,10 +88,6 @@) correctly matches this format - it means starting at line 88, 10 lines were in the original, and 6 lines appear in the new version. Options A, B, and C are invalid because they use timestamp-style values instead of the required line-number,count integers.

Topics

#unified diff#version control#code review#diff utility

Community Discussion

No community discussion yet for this question.

Full 200-901 Practice