summaryrefslogtreecommitdiff
path: root/repository.go
diff options
context:
space:
mode:
authorCarlos Martín Nieto <[email protected]>2015-06-28 00:58:31 +0200
committerCarlos Martín Nieto <[email protected]>2015-06-28 00:58:31 +0200
commitd2808d16101e113096b3a1c02e3f91122de74f15 (patch)
tree5dcb954b279e9760f867f84260858e4c9f0d75e5 /repository.go
parent4b9cbd78fd266767f6bdf55257c4ee2b1611bbe0 (diff)
Create a SubmoduleCollection for managing submodules
Similarly to RemoteCollection, this allows us to namespace the submodule operations much more concisely and removes API on the Repository.
Diffstat (limited to 'repository.go')
-rw-r--r--repository.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/repository.go b/repository.go
index 860050f..0427d85 100644
--- a/repository.go
+++ b/repository.go
@@ -17,10 +17,15 @@ type Repository struct {
// used to add, remove and configure remotes for this
// repository.
Remotes RemoteCollection
+ // Submodules represents the collectin of submodules and can
+ // be used to add, remove and configure submodules in this
+ // repostiory.
+ Submodules SubmoduleCollection
}
func initRepositoryObject(repo *Repository) {
- repo.Remotes.repo = repo
+ repo.Remotes.repo = repo
+ repo.Submodules.repo = repo
runtime.SetFinalizer(repo, (*Repository).Free)
}