// Copyright 2014 The Gogs Authors. All rights reserved.// Use of this source code is governed by a MIT-style// license that can be found in the LICENSE file.packagegitimport("path/filepath")// Repository represents a Git repository.typeRepositorystruct{PathstringcommitCachemap[sha1]*CommittagCachemap[sha1]*Tag}// OpenRepository opens the repository at the given path.funcOpenRepository(repoPathstring)(*Repository,error){repoPath,err:=filepath.Abs(repoPath)iferr!=nil{returnnil,err}return&Repository{Path:repoPath},nil}