@@ -446,7 +446,7 @@ static int list(int argc, const char **argv, const char *prefix)
446446 git_notes_list_usage , 0 );
447447
448448 if (1 < argc ) {
449- error (_ ("too many arguments" ) );
449+ error (_ ("unexpected argument: '%s'" ), argv [ 1 ] );
450450 usage_with_options (git_notes_list_usage , options );
451451 }
452452
@@ -508,7 +508,7 @@ static int add(int argc, const char **argv, const char *prefix)
508508 PARSE_OPT_KEEP_ARGV0 );
509509
510510 if (2 < argc ) {
511- error (_ ("too many arguments" ) );
511+ error (_ ("unexpected argument: '%s'" ), argv [ 2 ] );
512512 usage_with_options (git_notes_add_usage , options );
513513 }
514514
@@ -589,7 +589,7 @@ static int copy(int argc, const char **argv, const char *prefix)
589589
590590 if (from_stdin || rewrite_cmd ) {
591591 if (argc ) {
592- error (_ ("too many arguments" ) );
592+ error (_ ("unexpected argument: '%s'" ), argv [ 0 ] );
593593 usage_with_options (git_notes_copy_usage , options );
594594 } else {
595595 return notes_copy_from_stdin (force , rewrite_cmd );
@@ -601,7 +601,7 @@ static int copy(int argc, const char **argv, const char *prefix)
601601 usage_with_options (git_notes_copy_usage , options );
602602 }
603603 if (2 < argc ) {
604- error (_ ("too many arguments" ) );
604+ error (_ ("unexpected argument: '%s'" ), argv [ 2 ] );
605605 usage_with_options (git_notes_copy_usage , options );
606606 }
607607
@@ -684,7 +684,7 @@ static int append_edit(int argc, const char **argv, const char *prefix)
684684 PARSE_OPT_KEEP_ARGV0 );
685685
686686 if (2 < argc ) {
687- error (_ ("too many arguments" ) );
687+ error (_ ("unexpected argument: '%s'" ), argv [ 2 ] );
688688 usage_with_options (usage , options );
689689 }
690690
@@ -760,7 +760,7 @@ static int show(int argc, const char **argv, const char *prefix)
760760 0 );
761761
762762 if (1 < argc ) {
763- error (_ ("too many arguments" ) );
763+ error (_ ("unexpected argument: '%s'" ), argv [ 1 ] );
764764 usage_with_options (git_notes_show_usage , options );
765765 }
766766
@@ -913,7 +913,7 @@ static int merge(int argc, const char **argv, const char *prefix)
913913 error (_ ("must specify a notes ref to merge" ));
914914 usage_with_options (git_notes_merge_usage , options );
915915 } else if (!do_merge && argc ) {
916- error (_ ("too many arguments" ) );
916+ error (_ ("unexpected argument: '%s'" ), argv [ 0 ] );
917917 usage_with_options (git_notes_merge_usage , options );
918918 }
919919
@@ -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
@@ -1092,7 +1092,7 @@ static int get_ref(int argc, const char **argv, const char *prefix)
10921092 git_notes_get_ref_usage , 0 );
10931093
10941094 if (argc ) {
1095- error (_ ("too many arguments" ) );
1095+ error (_ ("unexpected argument: '%s'" ), argv [ 0 ] );
10961096 usage_with_options (git_notes_get_ref_usage , options );
10971097 }
10981098
0 commit comments