13
13
14
14
/* NEEDSWORK: switch to using parse_options */
15
15
static const char reflog_expire_usage [] =
16
- "git reflog expire [--expire=<time>] [--expire-unreachable=<time>] [--rewrite] [--updateref] [--stale-fix] [--dry-run | -n] [--verbose] [--all] <refs>..." ;
16
+ N_ ("git reflog expire [--expire=<time>] "
17
+ "[--expire-unreachable=<time>] "
18
+ "[--rewrite] [--updateref] [--stale-fix] [--dry-run | -n] "
19
+ "[--verbose] [--all] <refs>..." );
17
20
static const char reflog_delete_usage [] =
18
- "git reflog delete [--rewrite] [--updateref] [--dry-run | -n] [--verbose] <refs>..." ;
21
+ N_ ("git reflog delete [--rewrite] [--updateref] "
22
+ "[--dry-run | -n] [--verbose] <refs>..." );
19
23
static const char reflog_exists_usage [] =
20
- "git reflog exists <ref>" ;
24
+ N_ ( "git reflog exists <ref>" ) ;
21
25
22
26
static timestamp_t default_reflog_expire ;
23
27
static timestamp_t default_reflog_expire_unreachable ;
@@ -556,7 +560,7 @@ static int cmd_reflog_expire(int argc, const char **argv, const char *prefix)
556
560
break ;
557
561
}
558
562
else if (arg [0 ] == '-' )
559
- usage (reflog_expire_usage );
563
+ usage (_ ( reflog_expire_usage ) );
560
564
else
561
565
break ;
562
566
}
@@ -569,7 +573,7 @@ static int cmd_reflog_expire(int argc, const char **argv, const char *prefix)
569
573
if (cb .cmd .stalefix ) {
570
574
repo_init_revisions (the_repository , & cb .cmd .revs , prefix );
571
575
if (flags & EXPIRE_REFLOGS_VERBOSE )
572
- printf ("Marking reachable objects..." );
576
+ printf (_ ( "Marking reachable objects..." ) );
573
577
mark_reachable_objects (& cb .cmd .revs , 0 , 0 , NULL );
574
578
if (flags & EXPIRE_REFLOGS_VERBOSE )
575
579
putchar ('\n' );
@@ -598,7 +602,7 @@ static int cmd_reflog_expire(int argc, const char **argv, const char *prefix)
598
602
char * ref ;
599
603
struct object_id oid ;
600
604
if (!dwim_log (argv [i ], strlen (argv [i ]), & oid , & ref )) {
601
- status |= error ("%s points nowhere!" , argv [i ]);
605
+ status |= error (_ ( "%s points nowhere!" ) , argv [i ]);
602
606
continue ;
603
607
}
604
608
set_reflog_expiry_param (& cb .cmd , explicit_expiry , ref );
@@ -644,13 +648,13 @@ static int cmd_reflog_delete(int argc, const char **argv, const char *prefix)
644
648
break ;
645
649
}
646
650
else if (arg [0 ] == '-' )
647
- usage (reflog_delete_usage );
651
+ usage (_ ( reflog_delete_usage ) );
648
652
else
649
653
break ;
650
654
}
651
655
652
656
if (argc - i < 1 )
653
- return error ("Nothing to delete?" );
657
+ return error (_ ( "no reflog specified to delete" ) );
654
658
655
659
for ( ; i < argc ; i ++ ) {
656
660
const char * spec = strstr (argv [i ], "@{" );
@@ -659,12 +663,12 @@ static int cmd_reflog_delete(int argc, const char **argv, const char *prefix)
659
663
int recno ;
660
664
661
665
if (!spec ) {
662
- status |= error ("Not a reflog: %s" , argv [i ]);
666
+ status |= error (_ ( "not a reflog: %s") , argv [i ]);
663
667
continue ;
664
668
}
665
669
666
670
if (!dwim_log (argv [i ], spec - argv [i ], & oid , & ref )) {
667
- status |= error ("no reflog for '%s'" , argv [i ]);
671
+ status |= error (_ ( "no reflog for '%s'" ) , argv [i ]);
668
672
continue ;
669
673
}
670
674
@@ -699,18 +703,18 @@ static int cmd_reflog_exists(int argc, const char **argv, const char *prefix)
699
703
break ;
700
704
}
701
705
else if (arg [0 ] == '-' )
702
- usage (reflog_exists_usage );
706
+ usage (_ ( reflog_exists_usage ) );
703
707
else
704
708
break ;
705
709
}
706
710
707
711
start = i ;
708
712
709
713
if (argc - start != 1 )
710
- usage (reflog_exists_usage );
714
+ usage (_ ( reflog_exists_usage ) );
711
715
712
716
if (check_refname_format (argv [start ], REFNAME_ALLOW_ONELEVEL ))
713
- die ("invalid ref format: %s" , argv [start ]);
717
+ die (_ ( "invalid ref format: %s" ) , argv [start ]);
714
718
return !reflog_exists (argv [start ]);
715
719
}
716
720
@@ -719,12 +723,12 @@ static int cmd_reflog_exists(int argc, const char **argv, const char *prefix)
719
723
*/
720
724
721
725
static const char reflog_usage [] =
722
- "git reflog [ show | expire | delete | exists ]" ;
726
+ N_ ( "git reflog [ show | expire | delete | exists ]" ) ;
723
727
724
728
int cmd_reflog (int argc , const char * * argv , const char * prefix )
725
729
{
726
730
if (argc > 1 && !strcmp (argv [1 ], "-h" ))
727
- usage (reflog_usage );
731
+ usage (_ ( reflog_usage ) );
728
732
729
733
/* With no command, we default to showing it. */
730
734
if (argc < 2 || * argv [1 ] == '-' )
0 commit comments