com.caucho.git
Class GitRepository

java.lang.Object
  extended by com.caucho.git.GitRepository

public class GitRepository
extends java.lang.Object

Top-level class for a repository


Constructor Summary
GitRepository(Path root)
           
 
Method Summary
 boolean contains(java.lang.String sha1)
           
 void copyToFile(Path path, java.lang.String sha1)
           
 java.lang.String getMaster()
           
 Path getRefPath(java.lang.String path)
           
 java.lang.String getTag(java.lang.String tag)
           
 void initDb()
           
 java.lang.String[] listRefs(java.lang.String dir)
           
 java.lang.Object objectType(java.lang.String sha1)
           
 GitCommit parseCommit(java.lang.String sha1)
           
 GitTree parseTree(java.lang.String sha1)
           
 java.lang.String toString()
           
 java.lang.String writeCommit(GitCommit commit)
          Writes a file to the repository
 java.lang.String writeFile(Path path)
          Writes a file to the repository
 java.lang.String writeFile(TempOutputStream os, java.lang.String hex)
           
 void writeTag(java.lang.String tag, java.lang.String hex)
           
 java.lang.String writeTree(GitTree tree)
          Writes a file to the repository
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GitRepository

public GitRepository(Path root)
Method Detail

initDb

public void initDb()
            throws java.io.IOException
Throws:
java.io.IOException

getMaster

public java.lang.String getMaster()

objectType

public java.lang.Object objectType(java.lang.String sha1)
                            throws java.io.IOException
Throws:
java.io.IOException

getTag

public java.lang.String getTag(java.lang.String tag)

listRefs

public java.lang.String[] listRefs(java.lang.String dir)

getRefPath

public Path getRefPath(java.lang.String path)

writeTag

public void writeTag(java.lang.String tag,
                     java.lang.String hex)

parseCommit

public GitCommit parseCommit(java.lang.String sha1)
                      throws java.io.IOException
Throws:
java.io.IOException

parseTree

public GitTree parseTree(java.lang.String sha1)
                  throws java.io.IOException
Throws:
java.io.IOException

copyToFile

public void copyToFile(Path path,
                       java.lang.String sha1)
                throws java.io.IOException
Throws:
java.io.IOException

contains

public boolean contains(java.lang.String sha1)

writeFile

public java.lang.String writeFile(Path path)
                           throws java.io.IOException
Writes a file to the repository

Throws:
java.io.IOException

writeTree

public java.lang.String writeTree(GitTree tree)
                           throws java.io.IOException
Writes a file to the repository

Throws:
java.io.IOException

writeCommit

public java.lang.String writeCommit(GitCommit commit)
                             throws java.io.IOException
Writes a file to the repository

Throws:
java.io.IOException

writeFile

public java.lang.String writeFile(TempOutputStream os,
                                  java.lang.String hex)
                           throws java.io.IOException
Throws:
java.io.IOException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object