Reset command. It has setters for all
supported options and arguments of this command and a call() method
to finally execute the command. Each instance of this class should only be
used for one invocation of the command (means: one call to call())
| Modifier and Type | Class and Description |
|---|---|
| public static enum | ResetCommand.
Kind of reset |
| Modifier and Type | Field and Description |
|---|---|
| private Collection | |
| private boolean | |
| private ResetCommand. | |
| private ProgressMonitor | |
| private String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public ResetCommand | |
| public Ref | call()
Implements abstract org. Implements java. Computes a result, or throws an exception if unable to do so. |
| private void | |
| public ResetCommand | Returns: this instanceif disable)true disables writing a reflog entry for this reset
commandWhether to disable reflog |
| private String | |
| public boolean | Returns: true if writing reflog is disabled for this reset commandWhether reflog is disabled |
| private RevCommit | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private ObjectId | |
| public ResetCommand | Returns: this instancethe mode of the reset command modeSet the reset mode |
| public ResetCommand | Returns: thisThe progress monitor associated with the reset operation. |
| public ResetCommand | |
| public String |
| filepaths | back to summary |
|---|---|
| private Collection<String> filepaths | |
| isReflogDisabled | back to summary |
|---|---|
| private boolean isReflogDisabled | |
| mode | back to summary |
|---|---|
| private ResetCommand. | |
| monitor | back to summary |
|---|---|
| private ProgressMonitor monitor | |
| ref | back to summary |
|---|---|
| private String ref | |
| ResetCommand | back to summary |
|---|---|
| public ResetCommand(Repository repo) Constructor for ResetCommand.
| |
| addPath | back to summary |
|---|---|
| public ResetCommand addPath(String path) Repository relative path of file or directory to reset
| |
| call | back to summary |
|---|---|
| public Ref call() throws GitAPIException, CheckoutConflictException Implements abstract org. Implements java. Doc from org. Computes a result, or throws an exception if unable to do so. Execute the command
Executes the
| |
| checkoutIndex | back to summary |
|---|---|
| private void checkoutIndex(ObjectId commitTree) throws IOException, GitAPIException | |
| disableRefLog | back to summary |
|---|---|
| public ResetCommand disableRefLog(boolean disable) Whether to disable reflog
| |
| getRefOrHEAD | back to summary |
|---|---|
| private String getRefOrHEAD() | |
| isReflogDisabled | back to summary |
|---|---|
| public boolean isReflogDisabled() Whether reflog is disabled
| |
| parseCommit | back to summary |
|---|---|
| private RevCommit parseCommit(ObjectId commitId) | |
| resetCherryPick | back to summary |
|---|---|
| private void resetCherryPick() throws IOException | |
| resetIndex | back to summary |
|---|---|
| private void resetIndex(ObjectId commitTree) throws IOException | |
| resetIndexForPaths | back to summary |
|---|---|
| private void resetIndexForPaths(ObjectId commitTree) | |
| resetMerge | back to summary |
|---|---|
| private void resetMerge() throws IOException | |
| resetRevert | back to summary |
|---|---|
| private void resetRevert() throws IOException | |
| resolveRefToCommitId | back to summary |
|---|---|
| private ObjectId resolveRefToCommitId() | |
| setMode | back to summary |
|---|---|
| public ResetCommand setMode(ResetCommand. Set the reset mode
| |
| setProgressMonitor | back to summary |
|---|---|
| public ResetCommand setProgressMonitor(ProgressMonitor monitor) The progress monitor associated with the reset operation. By default,
this is set to
| |
| setRef | back to summary |
|---|---|
| public ResetCommand setRef(String ref) Set the name of the
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final ResetCommand. | HARD
Change the ref, the index and the workdir |
| public static final ResetCommand. | KEEP
Change the ref, the index and the workdir that are different between respective commit and HEAD |
| public static final ResetCommand. | MERGE
Resets the index and updates the files in the working tree that are different between respective commit and HEAD, but keeps those which are different between the index and working tree |
| public static final ResetCommand. | MIXED
Change the ref and the index, the workdir is not changed. |
| public static final ResetCommand. | SOFT
Just change the ref, the index and workdir are not changed. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static ResetCommand. | |
| public static ResetCommand. |
| HARD | back to summary |
|---|---|
| public static final ResetCommand. Change the ref, the index and the workdir | |
| KEEP | back to summary |
|---|---|
| public static final ResetCommand. Change the ref, the index and the workdir that are different between respective commit and HEAD | |
| MERGE | back to summary |
|---|---|
| public static final ResetCommand. Resets the index and updates the files in the working tree that are different between respective commit and HEAD, but keeps those which are different between the index and working tree | |
| MIXED | back to summary |
|---|---|
| public static final ResetCommand. Change the ref and the index, the workdir is not changed. | |
| SOFT | back to summary |
|---|---|
| public static final ResetCommand. Just change the ref, the index and workdir are not changed. | |
| ResetType | back to summary |
|---|---|
| private ResetType() | |
| valueOf | back to summary |
|---|---|
| public static ResetCommand. | |
| values | back to summary |
|---|---|
| public static ResetCommand. | |