Skip to content

Returns information about the differences in a valid commit specifier (such as a branch, tag, HEAD, commit ID, or other fully qualified reference)

Description

Returns information about the differences in a valid commit specifier (such as a branch, tag, HEAD, commit ID, or other fully qualified reference). Results can be limited to a specified path.

For line-level diff details, pass the beforeBlob.blobId and afterBlob.blobId values from a Difference object to get_blob_differences.

Usage

codecommit_get_differences(repositoryName, beforeCommitSpecifier,
  afterCommitSpecifier, beforePath, afterPath, MaxResults, NextToken)

Arguments

  • repositoryName

    [required] The name of the repository where you want to get differences.

  • beforeCommitSpecifier

    The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, the full commit ID). Optional. If not specified, all changes before the afterCommitSpecifier value are shown. If you do not use beforeCommitSpecifier in your request, consider limiting the results with maxResults.

  • afterCommitSpecifier

    [required] The branch, tag, HEAD, or other fully qualified reference used to identify a commit.

  • beforePath

    The file path in which to check for differences. Limits the results to this path. Can also be used to specify the previous name of a directory or folder. If beforePath and afterPath are not specified, differences are shown for all paths.

  • afterPath

    The file path in which to check differences. Limits the results to this path. Can also be used to specify the changed name of a directory or folder, if it has changed. If not specified, differences are shown for all paths.

  • MaxResults

    A non-zero, non-negative integer used to limit the number of returned results.

  • NextToken

    An enumeration token that, when provided in a request, returns the next batch of the results.

Value

A list with the following syntax:

list(
  differences = list(
    list(
      beforeBlob = list(
        blobId = "string",
        path = "string",
        mode = "string"
      ),
      afterBlob = list(
        blobId = "string",
        path = "string",
        mode = "string"
      ),
      changeType = "A"|"M"|"D"
    )
  ),
  NextToken = "string"
)

Request syntax

svc$get_differences(
  repositoryName = "string",
  beforeCommitSpecifier = "string",
  afterCommitSpecifier = "string",
  beforePath = "string",
  afterPath = "string",
  MaxResults = 123,
  NextToken = "string"
)