You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Each group of changes (called a "hunk") in the textual diff output is prefixed with a line of the form:
@@ -k,l +n,m @@ TEXT
This is called a hunk header. The "TEXT" portion is by default a line that begins with an alphabet, an underscore or a dollar sign; this matches what GNU diff -p output uses. This default selection however is not suited for some contents, and you can use a customized pattern to make a selection.
git diff seems to ship with a number of built-in patterns for a good number of common languages.
While I am less interested in the exact format, the ability for the hunk to be prefixed with helpful contextual information, e.g., the function name where the change takes place is quite useful, for example:
From gitattributes(5) documentation: https://git-scm.com/docs/gitattributes#_defining_a_custom_hunk_header
git diff seems to ship with a number of built-in patterns for a good number of common languages.
While I am less interested in the exact format, the ability for the hunk to be prefixed with helpful contextual information, e.g., the function name where the change takes place is quite useful, for example:
The prefix line with
class ConsoleDiff(object):
gives us valuable context clues when looking at the subsequent diff.Filing this as a potential feature request to add if someone has time to look at this more deeply.
The text was updated successfully, but these errors were encountered: