Package io.github.andreyzebin.gitSql.git
Class AbstractClient
java.lang.Object
io.github.andreyzebin.gitSql.git.AbstractClient
- All Implemented Interfaces:
Branches,GitAPI,GitDirectory,GitFs,Origins,Versions,AutoCloseable
- Direct Known Subclasses:
CommitSource,DirOriginSource,LocalSource,RemoteOrigin
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final DirectoryTreeFactory<io.github.zebin.javabash.sandbox.DirectoryTree>protected final io.github.zebin.javabash.sandbox.AllFileManagerprotected final StringBuffer -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractClient(io.github.zebin.javabash.sandbox.AllFileManager fm, DirectoryTreeFactory<io.github.zebin.javabash.sandbox.DirectoryTree> dtFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoidcommit()booleanvoidfetch()getChanges(String hashFrom) getChanges(String hashFrom, String hashTo) io.github.zebin.javabash.sandbox.DirectoryTreegetUpstream(String local) Fast-forwardvoidvoidpull()voidpush()protected <T> TrecoverState(Supplier<T> result) voidreset()Fast-forwardvoidgit checkout -b another_branch origin/another_branch; git branch -u origin/another_branch.voidprotected voidprotected <T> TvoidsetUpstream(String localBranch, String upstream) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.AutoCloseable
closeMethods inherited from interface io.github.andreyzebin.gitSql.git.GitDirectory
getLocation, getRoot
-
Field Details
-
fm
protected final io.github.zebin.javabash.sandbox.AllFileManager fm -
stage
-
dtFactory
-
dt
-
-
Constructor Details
-
AbstractClient
protected AbstractClient(io.github.zebin.javabash.sandbox.AllFileManager fm, DirectoryTreeFactory<io.github.zebin.javabash.sandbox.DirectoryTree> dtFactory)
-
-
Method Details
-
seek
Fast-forward -
reset
public void reset() -
listCommits
Fast-forward- Specified by:
listCommitsin interfaceVersions
-
listBranches
- Specified by:
listBranchesin interfaceBranches
-
contains
-
getChanges
- Specified by:
getChangesin interfaceVersions
-
getChanges
- Specified by:
getChangesin interfaceVersions
-
getTimestamp
- Specified by:
getTimestampin interfaceVersions
-
pull
public void pull() -
push
public void push() -
setOrigin
-
getOrigin
-
fetch
public void fetch() -
setUpstream
- Specified by:
setUpstreamin interfaceOrigins
-
getUpstream
- Specified by:
getUpstreamin interfaceOrigins
-
getBranch
-
setBranch
git checkout -b another_branch origin/another_branch; git branch -u origin/another_branch. That's to create another_branch from origin/another_branch and set origin/another_branch as the upstream of another_branch.TODO
-
merge
-
commit
public void commit() -
getDirectory
public io.github.zebin.javabash.sandbox.DirectoryTree getDirectory()- Specified by:
getDirectoryin interfaceGitDirectory
-
recoverState
-
setupDir
-
setupDir
-