cmds: various cleaning

Michael Muré created

Change summary

commands/comment.go       | 2 +-
commands/label.go         | 2 +-
commands/new.go           | 2 +-
doc/man/git-bug-comment.1 | 2 +-
doc/man/git-bug-label.1   | 2 +-
doc/man/git-bug-new.1     | 2 +-
doc/md/git-bug_comment.md | 2 +-
doc/md/git-bug_label.md   | 2 +-
doc/md/git-bug_new.md     | 2 +-
repository/git.go         | 2 +-
10 files changed, 10 insertions(+), 10 deletions(-)

Detailed changes

commands/comment.go 🔗

@@ -65,7 +65,7 @@ func runComment(cmd *cobra.Command, args []string) error {
 }
 
 var commentCmd = &cobra.Command{
-	Use:   "comment <id> [<options>...]",
+	Use:   "comment <id>",
 	Short: "Add a new comment to a bug",
 	RunE:  runComment,
 }

commands/label.go 🔗

@@ -49,7 +49,7 @@ func runLabel(cmd *cobra.Command, args []string) error {
 }
 
 var labelCmd = &cobra.Command{
-	Use:   "label [<option>...] <id> [<label>...]",
+	Use:   "label <id> [<label>...]",
 	Short: "Manipulate bug's label",
 	RunE:  runLabel,
 }

commands/new.go 🔗

@@ -53,7 +53,7 @@ func runNewBug(cmd *cobra.Command, args []string) error {
 }
 
 var newCmd = &cobra.Command{
-	Use:   "new [<option>...]",
+	Use:   "new",
 	Short: "Create a new bug",
 	RunE:  runNewBug,
 }

doc/man/git-bug-comment.1 🔗

@@ -10,7 +10,7 @@ git\-bug\-comment \- Add a new comment to a bug
 
 .SH SYNOPSIS
 .PP
-\fBgit\-bug comment <id> [<options>\&...] [flags]\fP
+\fBgit\-bug comment <id> [flags]\fP
 
 
 .SH DESCRIPTION

doc/man/git-bug-label.1 🔗

@@ -10,7 +10,7 @@ git\-bug\-label \- Manipulate bug's label
 
 .SH SYNOPSIS
 .PP
-\fBgit\-bug label [<option>\&...] <id> [<label>\&...] [flags]\fP
+\fBgit\-bug label <id> [<label>\&...] [flags]\fP
 
 
 .SH DESCRIPTION

doc/man/git-bug-new.1 🔗

@@ -10,7 +10,7 @@ git\-bug\-new \- Create a new bug
 
 .SH SYNOPSIS
 .PP
-\fBgit\-bug new [<option>\&...] [flags]\fP
+\fBgit\-bug new [flags]\fP
 
 
 .SH DESCRIPTION

doc/md/git-bug_comment.md 🔗

@@ -7,7 +7,7 @@ Add a new comment to a bug
 Add a new comment to a bug
 
 ```
-git-bug comment <id> [<options>...] [flags]
+git-bug comment <id> [flags]
 ```
 
 ### Options

doc/md/git-bug_label.md 🔗

@@ -7,7 +7,7 @@ Manipulate bug's label
 Manipulate bug's label
 
 ```
-git-bug label [<option>...] <id> [<label>...] [flags]
+git-bug label <id> [<label>...] [flags]
 ```
 
 ### Options

doc/md/git-bug_new.md 🔗

@@ -7,7 +7,7 @@ Create a new bug
 Create a new bug
 
 ```
-git-bug new [<option>...] [flags]
+git-bug new [flags]
 ```
 
 ### Options

repository/git.go 🔗

@@ -169,7 +169,7 @@ func (repo *GitRepo) PushRefs(remote string, refSpec string) (string, error) {
 	stdout, stderr, err := repo.runGitCommandRaw(nil, "push", remote, refSpec)
 
 	if err != nil {
-		return stdout + stderr, fmt.Errorf("failed to push to the remote '%s': %v", remote, err)
+		return stdout + stderr, fmt.Errorf("failed to push to the remote '%s': %v", remote, stderr)
 	}
 	return stdout + stderr, nil
 }