git

package
v1.5.2-upstream Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

** Copyright [2013-2017] [Megam Systems] ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License.

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 filepath. 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