@@ -567,7 +567,11 @@ int cmd_name_rev(int argc,
567567{
568568 struct mem_pool string_pool ;
569569 struct object_array revs = OBJECT_ARRAY_INIT ;
570- int all = 0 , annotate_stdin = 0 , transform_stdin = 0 , allow_undefined = 1 , always = 0 , peel_tag = 0 ;
570+
571+ #ifndef WITH_BREAKING_CHANGES
572+ int transform_stdin = 0 ;
573+ #endif
574+ int all = 0 , annotate_stdin = 0 , allow_undefined = 1 , always = 0 , peel_tag = 0 ;
571575 struct name_ref_data data = { 0 , 0 , STRING_LIST_INIT_NODUP , STRING_LIST_INIT_NODUP };
572576 struct option opts [] = {
573577 OPT_BOOL (0 , "name-only" , & data .name_only , N_ ("print only ref-based names (no object names)" )),
@@ -578,11 +582,13 @@ int cmd_name_rev(int argc,
578582 N_ ("ignore refs matching <pattern>" )),
579583 OPT_GROUP ("" ),
580584 OPT_BOOL (0 , "all" , & all , N_ ("list all commits reachable from all refs" )),
585+ #ifndef WITH_BREAKING_CHANGES
581586 OPT_BOOL_F (0 ,
582587 "stdin" ,
583588 & transform_stdin ,
584589 N_ ("deprecated: use --annotate-stdin instead" ),
585590 PARSE_OPT_HIDDEN ),
591+ #endif /* WITH_BREAKING_CHANGES */
586592 OPT_BOOL (0 , "annotate-stdin" , & annotate_stdin , N_ ("annotate text from stdin" )),
587593 OPT_BOOL (0 , "undefined" , & allow_undefined , N_ ("allow to print `undefined` names (default)" )),
588594 OPT_BOOL (0 , "always" , & always ,
@@ -597,12 +603,14 @@ int cmd_name_rev(int argc,
597603 git_config (git_default_config , NULL );
598604 argc = parse_options (argc , argv , prefix , opts , name_rev_usage , 0 );
599605
606+ #ifndef WITH_BREAKING_CHANGES
600607 if (transform_stdin ) {
601608 warning ("--stdin is deprecated. Please use --annotate-stdin instead, "
602609 "which is functionally equivalent.\n"
603610 "This option will be removed in a future release." );
604611 annotate_stdin = 1 ;
605612 }
613+ #endif
606614
607615 if (all + annotate_stdin + !!argc > 1 ) {
608616 error ("Specify either a list, or --all, not both!" );
0 commit comments