|
|
@ -46,6 +46,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
package org.eclipse.jgit.lib; |
|
|
|
package org.eclipse.jgit.lib; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import org.eclipse.jgit.JGitText; |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Important state of the repository that affects what can and cannot bed |
|
|
|
* Important state of the repository that affects what can and cannot bed |
|
|
|
* done. This is things like unhandled conflicted merges and unfinished rebase. |
|
|
|
* done. This is things like unhandled conflicted merges and unfinished rebase. |
|
|
@ -61,7 +62,7 @@ public enum RepositoryState { |
|
|
|
public boolean canCheckout() { return true; } |
|
|
|
public boolean canCheckout() { return true; } |
|
|
|
public boolean canResetHead() { return true; } |
|
|
|
public boolean canResetHead() { return true; } |
|
|
|
public boolean canCommit() { return true; } |
|
|
|
public boolean canCommit() { return true; } |
|
|
|
public String getDescription() { return "Normal"; } |
|
|
|
public String getDescription() { return JGitText.get().repositoryState_normal; } |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** An unfinished merge. Must resole or reset before continuing normally |
|
|
|
/** An unfinished merge. Must resole or reset before continuing normally |
|
|
@ -70,7 +71,7 @@ public enum RepositoryState { |
|
|
|
public boolean canCheckout() { return false; } |
|
|
|
public boolean canCheckout() { return false; } |
|
|
|
public boolean canResetHead() { return false; } |
|
|
|
public boolean canResetHead() { return false; } |
|
|
|
public boolean canCommit() { return false; } |
|
|
|
public boolean canCommit() { return false; } |
|
|
|
public String getDescription() { return "Conflicts"; } |
|
|
|
public String getDescription() { return JGitText.get().repositoryState_conflicts; } |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -81,7 +82,7 @@ public enum RepositoryState { |
|
|
|
public boolean canCheckout() { return true; } |
|
|
|
public boolean canCheckout() { return true; } |
|
|
|
public boolean canResetHead() { return true; } |
|
|
|
public boolean canResetHead() { return true; } |
|
|
|
public boolean canCommit() { return true; } |
|
|
|
public boolean canCommit() { return true; } |
|
|
|
public String getDescription() { return "Merged"; } |
|
|
|
public String getDescription() { return JGitText.get().repositoryState_merged; } |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -91,7 +92,7 @@ public enum RepositoryState { |
|
|
|
public boolean canCheckout() { return false; } |
|
|
|
public boolean canCheckout() { return false; } |
|
|
|
public boolean canResetHead() { return false; } |
|
|
|
public boolean canResetHead() { return false; } |
|
|
|
public boolean canCommit() { return true; } |
|
|
|
public boolean canCommit() { return true; } |
|
|
|
public String getDescription() { return "Rebase/Apply mailbox"; } |
|
|
|
public String getDescription() { return JGitText.get().repositoryState_rebaseOrApplyMailbox; } |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -101,7 +102,7 @@ public enum RepositoryState { |
|
|
|
public boolean canCheckout() { return false; } |
|
|
|
public boolean canCheckout() { return false; } |
|
|
|
public boolean canResetHead() { return false; } |
|
|
|
public boolean canResetHead() { return false; } |
|
|
|
public boolean canCommit() { return true; } |
|
|
|
public boolean canCommit() { return true; } |
|
|
|
public String getDescription() { return "Rebase"; } |
|
|
|
public String getDescription() { return JGitText.get().repositoryState_rebase; } |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -111,7 +112,7 @@ public enum RepositoryState { |
|
|
|
public boolean canCheckout() { return false; } |
|
|
|
public boolean canCheckout() { return false; } |
|
|
|
public boolean canResetHead() { return false; } |
|
|
|
public boolean canResetHead() { return false; } |
|
|
|
public boolean canCommit() { return true; } |
|
|
|
public boolean canCommit() { return true; } |
|
|
|
public String getDescription() { return "Apply mailbox"; } |
|
|
|
public String getDescription() { return JGitText.get().repositoryState_applyMailbox; } |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -121,7 +122,7 @@ public enum RepositoryState { |
|
|
|
public boolean canCheckout() { return false; } |
|
|
|
public boolean canCheckout() { return false; } |
|
|
|
public boolean canResetHead() { return false; } |
|
|
|
public boolean canResetHead() { return false; } |
|
|
|
public boolean canCommit() { return true; } |
|
|
|
public boolean canCommit() { return true; } |
|
|
|
public String getDescription() { return "Rebase w/merge"; } |
|
|
|
public String getDescription() { return JGitText.get().repositoryState_rebaseWithMerge; } |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -131,7 +132,7 @@ public enum RepositoryState { |
|
|
|
public boolean canCheckout() { return false; } |
|
|
|
public boolean canCheckout() { return false; } |
|
|
|
public boolean canResetHead() { return false; } |
|
|
|
public boolean canResetHead() { return false; } |
|
|
|
public boolean canCommit() { return true; } |
|
|
|
public boolean canCommit() { return true; } |
|
|
|
public String getDescription() { return "Rebase interactive"; } |
|
|
|
public String getDescription() { return JGitText.get().repositoryState_rebaseInteractive; } |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -144,10 +145,10 @@ public enum RepositoryState { |
|
|
|
/* Do not reset, checkout instead */ |
|
|
|
/* Do not reset, checkout instead */ |
|
|
|
public boolean canResetHead() { return false; } |
|
|
|
public boolean canResetHead() { return false; } |
|
|
|
|
|
|
|
|
|
|
|
/* Actually it may make sense, but for now we err on the side of caution */ |
|
|
|
/* Commit during bisect is useful */ |
|
|
|
public boolean canCommit() { return false; } |
|
|
|
public boolean canCommit() { return true; } |
|
|
|
|
|
|
|
|
|
|
|
public String getDescription() { return "Bisecting"; } |
|
|
|
public String getDescription() { return JGitText.get().repositoryState_bisecting; } |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|