aboutsummaryrefslogtreecommitdiffstats
path: root/commands/ls-labels.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2018-10-17 20:38:10 +0200
committerMichael Muré <batolettre@gmail.com>2018-10-17 20:39:35 +0200
commit7a511f9a13f3d1064fd11c9146e6b21cb961a8b2 (patch)
tree3ef98347986e32bd33efe8c5d5d66a8ba78b84af /commands/ls-labels.go
parent0e5c5a4db4461f0518dfea190b70683f7703fa09 (diff)
downloadgit-bug-7a511f9a13f3d1064fd11c9146e6b21cb961a8b2.tar.gz
commands: don't load the repo for commands that don't need it
fix #67
Diffstat (limited to 'commands/ls-labels.go')
-rw-r--r--commands/ls-labels.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/commands/ls-labels.go b/commands/ls-labels.go
index 49f4c7cb..9dd94f08 100644
--- a/commands/ls-labels.go
+++ b/commands/ls-labels.go
@@ -29,7 +29,8 @@ var lsLabelCmd = &cobra.Command{
Long: `List valid labels.
Note: in the future, a proper label policy could be implemented where valid labels are defined in a configuration file. Until that, the default behavior is to return the list of labels already used.`,
- RunE: runLsLabel,
+ PreRunE: loadRepo,
+ RunE: runLsLabel,
}
func init() {