Re: [PATCH 1/4] Refactoring: remove duplicated code from transport.c and builtin-send-pack.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Mon, Feb 15, 2010 at 5:27 AM, Michael Lukashov
<michael.lukashov@xxxxxxxxx> wrote:
> The following functions are duplicated:
>
>  verify_remote_names
>  update_tracking_ref
>  print_ref_status
>  status_abbrev
>  print_ok_ref_status
>  print_one_push_status
>  refs_pushed
>  print_push_status
>
> Signed-off-by: Michael Lukashov <michael.lukashov@xxxxxxxxx>

strictly speaking, the implementation for these functions are
different. Perhaps you could advertise in the commit message that some
of the functions from builtin-send-pack.c learnt porcelain, even
though it's always off (0).

> diff --git a/builtin-send-pack.c b/builtin-send-pack.c
> index 76c7206..616811a 100644
> --- a/builtin-send-pack.c
> +++ b/builtin-send-pack.c
> [snip]
> @@ -191,37 +191,47 @@ static void update_tracking_ref(struct remote *remote, struct ref *ref)
>        }
>  }
>
> -#define SUMMARY_WIDTH (2 * DEFAULT_ABBREV + 3)

hmm, since this is only used internally by print_ref_status, can't
this stay here rather than being made public in send-pack.h?

-- 
Cheers,
Ray Chuan
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]