dcloud git pulls file-diff

Read one changed file's diff, in pages of rows

IAM git:PullRepositoryRead

Needs git:GetPullRequest as well. 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 pulls file-diff repoId prNumber --path path [flags]

Arguments

  • <repoId>Required

    string

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

  • <prNumber>Required

    number

    Also accepted as --pr-number. Constraints: integer, min 1

Flags

  • --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

  • --baseOptional

    string

    The `base` commit the file list answered with: pass both so every page describes the same change if a branch moves meanwhile; the current one when absent

    Constraints: /^[0-9a-f]{40}(?:[0-9a-f]{24})?$/

  • --headOptional

    string

    The `head` commit the file list answered with: pass both so every page describes the same change if a branch moves meanwhile; the current one when absent

    Constraints: /^[0-9a-f]{40}(?:[0-9a-f]{24})?$/

Example

dcloud git pulls file-diff repoId prNumber --path example

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