Expand description
Read a unified diff and place it under the directory its paths are relative to, or say why the run cannot.
The CLI (--diff-file, --diff-stdin, $FALLOW_DIFF_FILE) and the
programmatic API (a diff inherited from FALLOW_DIFF_FILE) both call these
functions. A diff that one surface stands down on therefore stands down on
the other with the same reason token and the same sentence, which is what
request_outcomes["diff-filter"] publishes on both.
Structs§
- Diff
Stand Down - Why a supplied diff could not be applied, plus the sentence that says so.
Functions§
- diff_
base_ candidates - Directories a supplied unified diff’s paths might be relative to, most
preferred first: the git toplevel above
root, thenrootitself. Onlyrootoutside a git repository or whenrootis the toplevel. - place_
diff - Place a parsed diff under the directory its paths are relative to.
- read_
diff_ file - Read a diff file as UTF-8 text, within
MAX_DIFF_BYTES. - read_
diff_ text - Read a diff from
reader, up tolimitbytes, as UTF-8 text.