Skip to content

Commit 74884b5

Browse files
bebarinogitster
authored andcommitted
notes: rework subcommands and parse options
Running 'git notes copy -h' is not very helfpul right now. It lists the options for all the git notes subcommands and is rather confusing. Fix this by splitting cmd_notes() into separate functions for each subcommand (besides append and edit since they're very similar) and only providing a usage message for the subcommand. This has an added benefit of reducing the code complexity while making it safer and easier to read. The downside is we get some code bloat from similar setup and teardown needed for notes and options parsing. We also get a bit stricter in options parsing by only allowing the ref option to come before the subcommand. Acked-by: Johan Herland <[email protected]> Cc: Thomas Rast <[email protected]> Signed-off-by: Stephen Boyd <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 66d6819 commit 74884b5

File tree

2 files changed

+394
-166
lines changed

2 files changed

+394
-166
lines changed

0 commit comments

Comments
 (0)