aboutsummaryrefslogtreecommitdiffstats
path: root/commands/label_rm.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/label_rm.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/label_rm.go')
-rw-r--r--commands/label_rm.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/commands/label_rm.go b/commands/label_rm.go
index 5e9c8f24..e53ac09a 100644
--- a/commands/label_rm.go
+++ b/commands/label_rm.go
@@ -34,9 +34,10 @@ func runLabelRm(cmd *cobra.Command, args []string) error {
}
var labelRmCmd = &cobra.Command{
- Use: "rm [<id>] <label>[...]",
- Short: "Remove a label",
- RunE: runLabelRm,
+ Use: "rm [<id>] <label>[...]",
+ Short: "Remove a label",
+ PreRunE: loadRepo,
+ RunE: runLabelRm,
}
func init() {