git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tay Ray Chuan <rctay89@gmail.com>
To: Michael Lukashov <michael.lukashov@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/4] Refactoring: remove duplicated code from transport.c  and builtin-send-pack.c
Date: Mon, 15 Feb 2010 11:29:22 +0800	[thread overview]
Message-ID: <be6fef0d1002141929x1c0f48eekb7112463110cd275@mail.gmail.com> (raw)
In-Reply-To: <1266182863-5048-1-git-send-email-michael.lukashov@gmail.com>

Hi,

On Mon, Feb 15, 2010 at 5:27 AM, Michael Lukashov
<michael.lukashov@gmail.com> 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@gmail.com>

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

  parent reply	other threads:[~2010-02-15  3:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-14 21:27 [PATCH 1/4] Refactoring: remove duplicated code from transport.c and builtin-send-pack.c Michael Lukashov
2010-02-14 21:27 ` [PATCH 2/4] Refactoring: connect.c: move duplicated code to get_host_and_port Michael Lukashov
2010-02-15 21:11   ` Johannes Sixt
2010-02-14 21:27 ` [PATCH 3/4] Refactoring: move duplicated code from builtin-pack-objects.c and fast-import.c to object.c Michael Lukashov
2010-02-14 21:27 ` [PATCH 4/4] Refactoring: remove duplicated code from builtin-checkout.c and merge-recursive.c Michael Lukashov
2010-02-15  3:29 ` Tay Ray Chuan [this message]
2010-02-15  5:28 ` [PATCH 1/4] Refactoring: remove duplicated code from transport.c and builtin-send-pack.c Jeff King
2010-02-15  6:34   ` Junio C Hamano
2010-02-15  7:55     ` Jeff King
2010-02-15  8:46       ` Ilari Liusvaara
2010-02-15 18:25       ` Daniel Barkalow
     [not found]     ` <7v635zj8jr.fsf@alter.siamese.dyndns.org>
2010-02-15 17:30       ` Larry D'Anna

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=be6fef0d1002141929x1c0f48eekb7112463110cd275@mail.gmail.com \
    --to=rctay89@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=michael.lukashov@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).