dcloud git commits compare-file-diff

Read one file's diff between two refs, in pages of rows

IAM git:PullRepositoryRead

Paged: a large change is read a page of files and a page of rows at a time, never as one payload. A file with more than 1,500 changed lines, or a lock file or build output, has `collapsed` set (the console folds it until asked); a file whose patch is over 16 MiB answers `state: too-large`. Lines longer than 10,000 characters are cut, with the number left out in `cut`.

Synopsis

dcloud git commits compare-file-diff repoId --base base --head head --path path [flags]

Arguments

  • <repoId>Required

    string

    Also accepted as --repo-id. Constraints: uuid

Flags

  • --baseRequired

    string

    The ref the change is measured against

    Constraints: 1-255 chars

  • --headRequired

    string

    The ref with the changes

    Constraints: 1-255 chars

  • --pathRequired

    string

    The file, as the file list names it

    Constraints: 1-4096 chars

  • --old-pathOptional

    string

    A renamed file's `oldPath` from the file list, so the rename is followed

    Constraints: 1-4096 chars

  • --offsetOptional

    number

    `nextOffset` of the previous page; the first row when absent

    Constraints: integer, min 0

  • --limitOptional

    number

    Rows per page, at most 5000; 1000 when absent

    Constraints: integer, 1-5000

  • --layoutOptional

    enum

    `unified` (the default) one row per line; `split` old and new side by side

    One of: unified, split

  • --highlightOptional

    enum

    `true` to add syntax-highlighted HTML to each line; false when absent

    One of: true, false

  • --ignore-whitespaceOptional

    enum

    `true` to leave out changes that only touch whitespace; false when absent

    One of: true, false

Example

dcloud git commits compare-file-diff repoId --base example --head example --path example

Generated from the API description, the same one the API checks requests against and the CLI is built from.