From d0d7be8db010e2c68c98d0a34387e4fac0c4d6ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Mur=C3=A9?= Date: Sun, 14 Feb 2021 12:14:03 +0100 Subject: [PATCH] minor cleanups --- .gitignore | 1 + bug/op_edit_comment.go | 2 +- bug/op_label_change.go | 2 +- bug/op_noop.go | 2 +- bug/op_set_metadata.go | 2 +- bug/op_set_status.go | 2 +- bug/op_set_title.go | 2 +- doc/man/git-bug-comment-edit.1 | 2 +- doc/md/git-bug_comment_edit.md | 2 +- entity/err.go | 2 +- 10 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 012dadcd0ddb028876efa40314b1ef46ca4bd097..be1fc3f1c79365fda767169a31550b13d22bf273 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ git-bug dist coverage.txt .idea/ +.git_bak* diff --git a/bug/op_edit_comment.go b/bug/op_edit_comment.go index f9e30e62b47ba2478c1afd6abcc712bff2227ef6..e08aeaad9aa05082b2c12802a5d3de71aa6419b8 100644 --- a/bug/op_edit_comment.go +++ b/bug/op_edit_comment.go @@ -96,7 +96,7 @@ func (op *EditCommentOperation) Validate() error { return nil } -// UnmarshalJSON is a two step JSON unmarshaling +// UnmarshalJSON is a two step JSON unmarshalling // This workaround is necessary to avoid the inner OpBase.MarshalJSON // overriding the outer op's MarshalJSON func (op *EditCommentOperation) UnmarshalJSON(data []byte) error { diff --git a/bug/op_label_change.go b/bug/op_label_change.go index 5e51534d6f2e6c1ecfce624a30ea2f3fef5e8d47..d682fe54d0e0932d8b7cd77bc64b7d201f417f99 100644 --- a/bug/op_label_change.go +++ b/bug/op_label_change.go @@ -95,7 +95,7 @@ func (op *LabelChangeOperation) Validate() error { return nil } -// UnmarshalJSON is a two step JSON unmarshaling +// UnmarshalJSON is a two step JSON unmarshalling // This workaround is necessary to avoid the inner OpBase.MarshalJSON // overriding the outer op's MarshalJSON func (op *LabelChangeOperation) UnmarshalJSON(data []byte) error { diff --git a/bug/op_noop.go b/bug/op_noop.go index d59666ae38dacf50cbc020cc5b7f27ca229ae120..81efdb257c86b5f95e10350bd98b1d7908582ef4 100644 --- a/bug/op_noop.go +++ b/bug/op_noop.go @@ -31,7 +31,7 @@ func (op *NoOpOperation) Validate() error { return op.OpBase.Validate(op, NoOpOp) } -// UnmarshalJSON is a two step JSON unmarshaling +// UnmarshalJSON is a two step JSON unmarshalling // This workaround is necessary to avoid the inner OpBase.MarshalJSON // overriding the outer op's MarshalJSON func (op *NoOpOperation) UnmarshalJSON(data []byte) error { diff --git a/bug/op_set_metadata.go b/bug/op_set_metadata.go index c4988b84f67163a648b98b6445c0cc265486ad03..4e596728cb7c6742a5f6b8413c6df18213f434d8 100644 --- a/bug/op_set_metadata.go +++ b/bug/op_set_metadata.go @@ -49,7 +49,7 @@ func (op *SetMetadataOperation) Validate() error { return nil } -// UnmarshalJSON is a two step JSON unmarshaling +// UnmarshalJSON is a two step JSON unmarshalling // This workaround is necessary to avoid the inner OpBase.MarshalJSON // overriding the outer op's MarshalJSON func (op *SetMetadataOperation) UnmarshalJSON(data []byte) error { diff --git a/bug/op_set_status.go b/bug/op_set_status.go index fcf33f8c55d15791f1574ec08864e2c6eb7da0c8..ca8c434a9bf912b7e295f44f6cd1e2fecf697798 100644 --- a/bug/op_set_status.go +++ b/bug/op_set_status.go @@ -51,7 +51,7 @@ func (op *SetStatusOperation) Validate() error { return nil } -// UnmarshalJSON is a two step JSON unmarshaling +// UnmarshalJSON is a two step JSON unmarshalling // This workaround is necessary to avoid the inner OpBase.MarshalJSON // overriding the outer op's MarshalJSON func (op *SetStatusOperation) UnmarshalJSON(data []byte) error { diff --git a/bug/op_set_title.go b/bug/op_set_title.go index 7fd7c20d16039c22322d33cbeceee16a5e0c9598..899b4fa3796ff7993697f30fcbb057aab506f7ef 100644 --- a/bug/op_set_title.go +++ b/bug/op_set_title.go @@ -71,7 +71,7 @@ func (op *SetTitleOperation) Validate() error { return nil } -// UnmarshalJSON is a two step JSON unmarshaling +// UnmarshalJSON is a two step JSON unmarshalling // This workaround is necessary to avoid the inner OpBase.MarshalJSON // overriding the outer op's MarshalJSON func (op *SetTitleOperation) UnmarshalJSON(data []byte) error { diff --git a/doc/man/git-bug-comment-edit.1 b/doc/man/git-bug-comment-edit.1 index e3cb2daf0347848d58aa3dbaf473737eaf325a82..741743a679497e08f1fba54512af9b20b050b7cf 100644 --- a/doc/man/git-bug-comment-edit.1 +++ b/doc/man/git-bug-comment-edit.1 @@ -8,7 +8,7 @@ git\-bug\-comment\-edit \- Edit an existing comment on a bug. .SH SYNOPSIS .PP -\fBgit\-bug comment edit [flags]\fP +\fBgit\-bug comment edit [COMMENT\_ID] [flags]\fP .SH DESCRIPTION diff --git a/doc/md/git-bug_comment_edit.md b/doc/md/git-bug_comment_edit.md index 2546dff16df46b4048d4db12ebf39ca31741e7fe..26571927744c9a1582151110779bf70ceec2e02e 100644 --- a/doc/md/git-bug_comment_edit.md +++ b/doc/md/git-bug_comment_edit.md @@ -3,7 +3,7 @@ Edit an existing comment on a bug. ``` -git-bug comment edit [flags] +git-bug comment edit [COMMENT_ID] [flags] ``` ### Options diff --git a/entity/err.go b/entity/err.go index 9222e4dac460118d074a524b0c37c99440af80d3..9f7f5a1a18dfb9b0db01a78317bc710e3d7ed8c5 100644 --- a/entity/err.go +++ b/entity/err.go @@ -52,7 +52,7 @@ func NewErrUnknowFormat(expected uint) *ErrInvalidFormat { func (e ErrInvalidFormat) Error() string { if e.version == 0 { - return fmt.Sprintf("unreadable data, expected format version %v", e.expected) + return fmt.Sprintf("unreadable data, you likely have an outdated repository format, please use https://github.com/MichaelMure/git-bug-migration to upgrade to format version %v", e.expected) } if e.version < e.expected { return fmt.Sprintf("outdated repository format %v, please use https://github.com/MichaelMure/git-bug-migration to upgrade to format version %v", e.version, e.expected)