@@ -447,7 +447,7 @@ static int list(int argc, const char **argv, const char *prefix)
447447 git_notes_list_usage , 0 );
448448
449449 if (1 < argc ) {
450- error (_ ("too many arguments" ) );
450+ error (_ ("unexpected argument: '%s'" ), argv [ 1 ] );
451451 usage_with_options (git_notes_list_usage , options );
452452 }
453453
@@ -509,7 +509,7 @@ static int add(int argc, const char **argv, const char *prefix)
509509 PARSE_OPT_KEEP_ARGV0 );
510510
511511 if (2 < argc ) {
512- error (_ ("too many arguments" ) );
512+ error (_ ("unexpected argument: '%s'" ), argv [ 2 ] );
513513 usage_with_options (git_notes_add_usage , options );
514514 }
515515
@@ -591,7 +591,7 @@ static int copy(int argc, const char **argv, const char *prefix)
591591
592592 if (from_stdin || rewrite_cmd ) {
593593 if (argc ) {
594- error (_ ("too many arguments" ) );
594+ error (_ ("unexpected argument: '%s'" ), argv [ 0 ] );
595595 usage_with_options (git_notes_copy_usage , options );
596596 } else {
597597 return notes_copy_from_stdin (force , rewrite_cmd );
@@ -603,7 +603,7 @@ static int copy(int argc, const char **argv, const char *prefix)
603603 usage_with_options (git_notes_copy_usage , options );
604604 }
605605 if (2 < argc ) {
606- error (_ ("too many arguments" ) );
606+ error (_ ("unexpected argument: '%s'" ), argv [ 2 ] );
607607 usage_with_options (git_notes_copy_usage , options );
608608 }
609609
@@ -686,7 +686,7 @@ static int append_edit(int argc, const char **argv, const char *prefix)
686686 PARSE_OPT_KEEP_ARGV0 );
687687
688688 if (2 < argc ) {
689- error (_ ("too many arguments" ) );
689+ error (_ ("unexpected argument: '%s'" ), argv [ 2 ] );
690690 usage_with_options (usage , options );
691691 }
692692
@@ -762,7 +762,7 @@ static int show(int argc, const char **argv, const char *prefix)
762762 0 );
763763
764764 if (1 < argc ) {
765- error (_ ("too many arguments" ) );
765+ error (_ ("unexpected argument: '%s'" ), argv [ 1 ] );
766766 usage_with_options (git_notes_show_usage , options );
767767 }
768768
@@ -915,7 +915,7 @@ static int merge(int argc, const char **argv, const char *prefix)
915915 error (_ ("must specify a notes ref to merge" ));
916916 usage_with_options (git_notes_merge_usage , options );
917917 } else if (!do_merge && argc ) {
918- error (_ ("too many arguments" ) );
918+ error (_ ("unexpected argument: '%s'" ), argv [ 0 ] );
919919 usage_with_options (git_notes_merge_usage , options );
920920 }
921921
@@ -1069,7 +1069,7 @@ static int prune(int argc, const char **argv, const char *prefix)
10691069 0 );
10701070
10711071 if (argc ) {
1072- error (_ ("too many arguments" ) );
1072+ error (_ ("unexpected argument: '%s'" ), argv [ 0 ] );
10731073 usage_with_options (git_notes_prune_usage , options );
10741074 }
10751075
@@ -1091,7 +1091,7 @@ static int get_ref(int argc, const char **argv, const char *prefix)
10911091 git_notes_get_ref_usage , 0 );
10921092
10931093 if (argc ) {
1094- error (_ ("too many arguments" ) );
1094+ error (_ ("unexpected argument: '%s'" ), argv [ 0 ] );
10951095 usage_with_options (git_notes_get_ref_usage , options );
10961096 }
10971097
0 commit comments