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