@@ -379,7 +379,7 @@ static void clone_local(const char *src_repo, const char *dest_repo)
379
379
}
380
380
381
381
if (0 <= option_verbosity )
382
- printf ( _ ("done.\n" ));
382
+ fprintf ( stderr , _ ("done.\n" ));
383
383
}
384
384
385
385
static const char * junk_work_tree ;
@@ -550,13 +550,13 @@ static void update_remote_refs(const struct ref *refs,
550
550
const struct ref * rm = mapped_refs ;
551
551
552
552
if (check_connectivity ) {
553
- if (0 <= option_verbosity )
554
- printf ( _ ("Checking connectivity... " ));
553
+ if (transport -> progress )
554
+ fprintf ( stderr , _ ("Checking connectivity... " ));
555
555
if (check_everything_connected_with_transport (iterate_ref_map ,
556
556
0 , & rm , transport ))
557
557
die (_ ("remote did not send all necessary objects" ));
558
- if (0 <= option_verbosity )
559
- printf ( _ ("done.\n" ));
558
+ if (transport -> progress )
559
+ fprintf ( stderr , _ ("done.\n" ));
560
560
}
561
561
562
562
if (refs ) {
@@ -849,9 +849,9 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
849
849
850
850
if (0 <= option_verbosity ) {
851
851
if (option_bare )
852
- printf ( _ ("Cloning into bare repository '%s'...\n" ), dir );
852
+ fprintf ( stderr , _ ("Cloning into bare repository '%s'...\n" ), dir );
853
853
else
854
- printf ( _ ("Cloning into '%s'...\n" ), dir );
854
+ fprintf ( stderr , _ ("Cloning into '%s'...\n" ), dir );
855
855
}
856
856
init_db (option_template , INIT_DB_QUIET );
857
857
write_config (& option_config );
@@ -884,27 +884,25 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
884
884
remote = remote_get (option_origin );
885
885
transport = transport_get (remote , remote -> url [0 ]);
886
886
887
- if (!is_local ) {
888
- if (!transport -> get_refs_list || !transport -> fetch )
889
- die (_ ("Don't know how to clone %s" ), transport -> url );
887
+ if (!transport -> get_refs_list || (!is_local && !transport -> fetch ))
888
+ die (_ ("Don't know how to clone %s" ), transport -> url );
890
889
891
- transport_set_option (transport , TRANS_OPT_KEEP , "yes" );
890
+ transport_set_option (transport , TRANS_OPT_KEEP , "yes" );
892
891
893
- if (option_depth )
894
- transport_set_option (transport , TRANS_OPT_DEPTH ,
895
- option_depth );
896
- if (option_single_branch )
897
- transport_set_option (transport , TRANS_OPT_FOLLOWTAGS , "1" );
892
+ if (option_depth )
893
+ transport_set_option (transport , TRANS_OPT_DEPTH ,
894
+ option_depth );
895
+ if (option_single_branch )
896
+ transport_set_option (transport , TRANS_OPT_FOLLOWTAGS , "1" );
898
897
899
- transport_set_verbosity (transport , option_verbosity , option_progress );
898
+ transport_set_verbosity (transport , option_verbosity , option_progress );
900
899
901
- if (option_upload_pack )
902
- transport_set_option (transport , TRANS_OPT_UPLOADPACK ,
903
- option_upload_pack );
900
+ if (option_upload_pack )
901
+ transport_set_option (transport , TRANS_OPT_UPLOADPACK ,
902
+ option_upload_pack );
904
903
905
- if (transport -> smart_options && !option_depth )
906
- transport -> smart_options -> check_self_contained_and_connected = 1 ;
907
- }
904
+ if (transport -> smart_options && !option_depth )
905
+ transport -> smart_options -> check_self_contained_and_connected = 1 ;
908
906
909
907
refs = transport_get_remote_refs (transport );
910
908
0 commit comments