From: Michael Lukashov Date: Tue, 16 Feb 2010 23:42:52 +0000 (+0000) Subject: refactor duplicated code in builtin-send-pack.c and transport.c X-Git-Tag: v1.7.1-rc0~113^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/f1863d0d16b9a5288671e17b7fa2eba8244ead2f?hp=f1863d0d16b9a5288671e17b7fa2eba8244ead2f refactor duplicated code in builtin-send-pack.c and transport.c The following functions are (almost) identical: verify_remote_names update_tracking_ref refs_pushed print_push_status Move common versions of these functions to transport.c and rename them, as suggested by Jeff King and Junio C Hamano. These functions have been removed entirely from builtin-send-pack.c, since they are only used internally by print_push_status(): print_ref_status status_abbrev print_ok_ref_status print_one_push_status Also, move #define SUMMARY_WIDTH to transport.h and rename it TRANSPORT_SUMMARY_WIDTH as it is used in builtin-fetch.c and transport.c Signed-off-by: Michael Lukashov Acked-by: Tay Ray Chuan Signed-off-by: Junio C Hamano ---