Merge "RepositoryState: add method canAmend"
This commit is contained in:
commit
2238fc9358
|
@ -60,6 +60,7 @@ public enum RepositoryState {
|
|||
public boolean canCheckout() { return false; }
|
||||
public boolean canResetHead() { return false; }
|
||||
public boolean canCommit() { return false; }
|
||||
public boolean canAmend() { return false; }
|
||||
public String getDescription() { return "Bare"; }
|
||||
},
|
||||
|
||||
|
@ -70,6 +71,7 @@ public enum RepositoryState {
|
|||
public boolean canCheckout() { return true; }
|
||||
public boolean canResetHead() { return true; }
|
||||
public boolean canCommit() { return true; }
|
||||
public boolean canAmend() { return true; }
|
||||
public String getDescription() { return JGitText.get().repositoryState_normal; }
|
||||
},
|
||||
|
||||
|
@ -79,6 +81,7 @@ public enum RepositoryState {
|
|||
public boolean canCheckout() { return false; }
|
||||
public boolean canResetHead() { return true; }
|
||||
public boolean canCommit() { return false; }
|
||||
public boolean canAmend() { return false; }
|
||||
public String getDescription() { return JGitText.get().repositoryState_conflicts; }
|
||||
},
|
||||
|
||||
|
@ -90,6 +93,7 @@ public enum RepositoryState {
|
|||
public boolean canCheckout() { return true; }
|
||||
public boolean canResetHead() { return true; }
|
||||
public boolean canCommit() { return true; }
|
||||
public boolean canAmend() { return false; }
|
||||
public String getDescription() { return JGitText.get().repositoryState_merged; }
|
||||
},
|
||||
|
||||
|
@ -99,6 +103,7 @@ public enum RepositoryState {
|
|||
public boolean canCheckout() { return false; }
|
||||
public boolean canResetHead() { return true; }
|
||||
public boolean canCommit() { return false; }
|
||||
public boolean canAmend() { return false; }
|
||||
public String getDescription() { return JGitText.get().repositoryState_conflicts; }
|
||||
},
|
||||
|
||||
|
@ -110,6 +115,7 @@ public enum RepositoryState {
|
|||
public boolean canCheckout() { return true; }
|
||||
public boolean canResetHead() { return true; }
|
||||
public boolean canCommit() { return true; }
|
||||
public boolean canAmend() { return false; }
|
||||
public String getDescription() { return JGitText.get().repositoryState_merged; }
|
||||
},
|
||||
|
||||
|
@ -120,6 +126,7 @@ public enum RepositoryState {
|
|||
public boolean canCheckout() { return false; }
|
||||
public boolean canResetHead() { return false; }
|
||||
public boolean canCommit() { return true; }
|
||||
public boolean canAmend() { return true; }
|
||||
public String getDescription() { return JGitText.get().repositoryState_rebaseOrApplyMailbox; }
|
||||
},
|
||||
|
||||
|
@ -130,6 +137,7 @@ public enum RepositoryState {
|
|||
public boolean canCheckout() { return false; }
|
||||
public boolean canResetHead() { return false; }
|
||||
public boolean canCommit() { return true; }
|
||||
public boolean canAmend() { return true; }
|
||||
public String getDescription() { return JGitText.get().repositoryState_rebase; }
|
||||
},
|
||||
|
||||
|
@ -140,6 +148,7 @@ public enum RepositoryState {
|
|||
public boolean canCheckout() { return false; }
|
||||
public boolean canResetHead() { return false; }
|
||||
public boolean canCommit() { return true; }
|
||||
public boolean canAmend() { return true; }
|
||||
public String getDescription() { return JGitText.get().repositoryState_applyMailbox; }
|
||||
},
|
||||
|
||||
|
@ -150,6 +159,7 @@ public enum RepositoryState {
|
|||
public boolean canCheckout() { return false; }
|
||||
public boolean canResetHead() { return false; }
|
||||
public boolean canCommit() { return true; }
|
||||
public boolean canAmend() { return true; }
|
||||
public String getDescription() { return JGitText.get().repositoryState_rebaseWithMerge; }
|
||||
},
|
||||
|
||||
|
@ -160,6 +170,7 @@ public enum RepositoryState {
|
|||
public boolean canCheckout() { return false; }
|
||||
public boolean canResetHead() { return false; }
|
||||
public boolean canCommit() { return true; }
|
||||
public boolean canAmend() { return true; }
|
||||
public String getDescription() { return JGitText.get().repositoryState_rebaseInteractive; }
|
||||
},
|
||||
|
||||
|
@ -176,6 +187,8 @@ public enum RepositoryState {
|
|||
/* Commit during bisect is useful */
|
||||
public boolean canCommit() { return true; }
|
||||
|
||||
public boolean canAmend() { return false; }
|
||||
|
||||
public String getDescription() { return JGitText.get().repositoryState_bisecting; }
|
||||
};
|
||||
|
||||
|
@ -194,6 +207,11 @@ public enum RepositoryState {
|
|||
*/
|
||||
public abstract boolean canResetHead();
|
||||
|
||||
/**
|
||||
* @return true if amending is considered SAFE
|
||||
*/
|
||||
public abstract boolean canAmend();
|
||||
|
||||
/**
|
||||
* @return a human readable description of the state.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue