Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WorkingTree ¶
type WorkingTree struct {
// contains filtered or unexported fields
}
WorkingTree encapsulates a git repository.
func Get ¶
func Get(dir string) (wt WorkingTree, err error)
Get returns a WorkingTree for the specified directory. If the directory is not the root of a git repository the directory hierarchy is walked to find the root (i.e. the directory where the .git dir resides).
func (WorkingTree) Checkout ¶
func (wt WorkingTree) Checkout(hash string) error
Checkout calls "git checkout" with the specified hash.
func (WorkingTree) Clone ¶
func (wt WorkingTree) Clone(dest string) (result WorkingTree, err error)
Clone calls "git clone", cloning the working tree into the specified directory. The returned WorkingTree points to the clone of the repository.
func (WorkingTree) Root ¶
func (wt WorkingTree) Root() string
Root returns the root directory of the working tree.
Click to show internal directories.
Click to hide internal directories.