git

package
v0.0.0-...-5650998 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 26, 2014 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package git provides types and utilities for dealing with Git repositories. It's very limited, and provide some access to git config file, being focused on tsuru needs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiscoverRepositoryPath

func DiscoverRepositoryPath(dir string) (string, error)

DiscoverRepositoryPath finds the path of the repository from a given directory. It returns the path to the repository, or an an empty string and a non-nil error if it can't find the repository.

Types

type Repository

type Repository struct {
	// contains filtered or unexported fields
}

Repository represents a git repository.

func OpenRepository

func OpenRepository(p string) (*Repository, error)

OpenRepository opens a repository by its path. You can use DiscoverRepositoryPath to discover the repository from any directory, and use the result of this call as parameter for OpenRepository.

OpenRepository will return an error if the given path does not appear to be a git repository.

func (*Repository) RemoteURL

func (r *Repository) RemoteURL(name string) (string, error)

RemoteURL returns the URL of a remote by its name. Or an error, if the remote is not declared.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL