Package org.eclipse.jgit.pgm
Class Branch
- java.lang.Object
-
- org.eclipse.jgit.pgm.TextBuiltin
-
- org.eclipse.jgit.pgm.Branch
-
class Branch extends TextBuiltin
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.jgit.pgm.TextBuiltin
TextBuiltin.TerminatedByHelpException
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
all
private java.lang.String
branch
private java.lang.String
containsCommitish
private boolean
createForce
private java.util.List<java.lang.String>
delete
private java.util.List<java.lang.String>
deleteForce
private int
maxNameLength
private java.lang.String
otherBranch
private java.util.Map<java.lang.String,Ref>
printRefs
private boolean
remote
private boolean
rename
private RevWalk
rw
Only set for verbose branch listing at-the-momentprivate boolean
verbose
-
Constructor Summary
Constructors Constructor Description Branch()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
addRef(java.lang.String name, Ref ref)
private void
addRefs(java.util.Collection<Ref> refs, java.lang.String prefix)
void
createForce(java.util.List<java.lang.String> branchAndStartPoint)
Forcefully create a list of branchesvoid
delete(java.util.List<java.lang.String> names)
Delete branchesprivate void
delete(java.util.List<java.lang.String> branches, boolean force)
void
deleteForce(java.util.List<java.lang.String> names)
Forcefully delete branchesprivate void
list()
void
moveRename(java.util.List<java.lang.String> currentAndNew)
Move or rename a branchprivate void
printHead(ObjectReader reader, java.lang.String ref, boolean isCurrent, Ref refObj)
protected void
run()
Perform the actions of this command.-
Methods inherited from class org.eclipse.jgit.pgm.TextBuiltin
abbreviateRef, containsHelp, die, die, die, die, execute, getErrorWriter, getOutputWriter, getRepository, getResourceBundle, init, initRaw, parseArguments, printUsage, printUsageAndExit, printUsageAndExit, requiresRepository, resolve, setCommandName
-
-
-
-
Field Detail
-
otherBranch
private java.lang.String otherBranch
-
createForce
private boolean createForce
-
rename
private boolean rename
-
remote
private boolean remote
-
all
private boolean all
-
containsCommitish
private java.lang.String containsCommitish
-
delete
private java.util.List<java.lang.String> delete
-
deleteForce
private java.util.List<java.lang.String> deleteForce
-
verbose
private boolean verbose
-
branch
private java.lang.String branch
-
printRefs
private final java.util.Map<java.lang.String,Ref> printRefs
-
rw
private RevWalk rw
Only set for verbose branch listing at-the-moment
-
maxNameLength
private int maxNameLength
-
-
Method Detail
-
delete
public void delete(java.util.List<java.lang.String> names)
Delete branches- Parameters:
names
- aList
of branch names.
-
deleteForce
public void deleteForce(java.util.List<java.lang.String> names)
Forcefully delete branches- Parameters:
names
- aList
of branch names.
-
createForce
public void createForce(java.util.List<java.lang.String> branchAndStartPoint)
Forcefully create a list of branches- Parameters:
branchAndStartPoint
- a branch name and a start point
-
moveRename
public void moveRename(java.util.List<java.lang.String> currentAndNew)
Move or rename a branch- Parameters:
currentAndNew
- the current and the new branch name
-
run
protected void run()
Perform the actions of this command.This method should only be invoked by
TextBuiltin.execute(String[])
.- Specified by:
run
in classTextBuiltin
-
list
private void list() throws java.io.IOException, GitAPIException
- Throws:
java.io.IOException
GitAPIException
-
addRefs
private void addRefs(java.util.Collection<Ref> refs, java.lang.String prefix)
-
addRef
private void addRef(java.lang.String name, Ref ref)
-
printHead
private void printHead(ObjectReader reader, java.lang.String ref, boolean isCurrent, Ref refObj) throws java.io.IOException
- Throws:
java.io.IOException
-
delete
private void delete(java.util.List<java.lang.String> branches, boolean force) throws java.io.IOException
- Throws:
java.io.IOException
-
-