public class

PullRequestEffectiveDiff

extends Object
java.lang.Object
   ↳ com.atlassian.bitbucket.scm.pull.PullRequestEffectiveDiff

Class Overview

Describes the commits selected for a pull request's effective diff.

When a pull request is created, the branches to merge from and to are chosen. This represents the pull request's actual diff. However, it is up to the underlying SCM to determine how the branch diff is constructed by choosing the commits that will be used to produce the effective diff, which is the diff that will be streamed by the command factory.

How the commits are selected is left entirely to the SCM. Some possibilities are:

  • A diff between the incoming branch and the common ancestor shared with the target branch
  • A diff between the incoming branch and a theoretical merge commit
The differences between these two theoretical diffs are likely to be subtle in most pull requests, but may be very obvious in others. command factory implementors are encouraged to provide documentation as to how the effective diff is chosen for that implementation to aid plugin developers in understanding the diff that will be generated.

Summary

Public Constructors
PullRequestEffectiveDiff(String untilId, String sinceId)
Public Methods
boolean equals(Object o)
@Nonnull String getSinceId()
Retrieves the commit which will serve as the ancestor revision when generating a pull request's diff.
@Nonnull String getUntilId()
Retrieves the commit which will serve as the tip revision when generating a pull request's diff.
int hashCode()
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public PullRequestEffectiveDiff (String untilId, String sinceId)

Public Methods

public boolean equals (Object o)

@Nonnull public String getSinceId ()

Retrieves the commit which will serve as the ancestor revision when generating a pull request's diff. It is strongly encouraged that this be an actual ancestor of the "until" commit, as arbitrary diffs between unrelated commits may produce useless, noisy diffs.

Returns
  • the ancestor commit in the diff

@Nonnull public String getUntilId ()

Retrieves the commit which will serve as the tip revision when generating a pull request's diff. The diff will show the changes from the "since" commit up to and including this commit.

Returns
  • the tip commit in the diff

public int hashCode ()