public class LastModifiedRequest extends AbstractCommitRequest
path
, from a given starting commit
. The result
should be similar to retrieving the latest commit
for each
file, but may be significantly more efficient since it can be done in a single request.Modifier and Type | Class and Description |
---|---|
static class |
LastModifiedRequest.Builder |
AbstractCommitRequest.AbstractCommitRequestBuilder<B extends AbstractCommitRequest.AbstractCommitRequestBuilder<B>>
UNLIMITED_MESSAGE_LENGTH
Modifier and Type | Method and Description |
---|---|
String |
getCommitId()
Retrieves the starting commit to use.
|
String |
getPath()
Retrieves the path where file modifications should be searched.
|
getMaxMessageLength, getRepository
@Nonnull public String getCommitId()
path
's file listing will use this commitBranch
or Tag
. Depending on which files
that commit directly modified, however, it's entirely possible none of the resulting last
modified commits will be this one.getCommitId
in class AbstractCommitRequest
@Nullable public String getPath()
null
, ""
and /
all indicate the root directory.
For example, consider a repository with the following contents. Entries ending with /
are
directories.
src/ main/ java/ Example.java resources/ atlassian-plugin.xml pom.xmlA request for the root directory will return the commit that last modified
pom.xml
, the only
file in the root directory. A request for src/main
will not return any modifications
because that path only contains subdirectories.
For performance reasons, there is no way to use this request to recursively find the last modification
for files in subdirectories. Each level must be requested individually. This aligns with how
streaming directories
works
when the recursive
flag is false
.
getPath
in class AbstractCommitRequest
null
to search for file
modifications in the root directoryCopyright © 2022 Atlassian. All rights reserved.