All of lore.kernel.org
 help / color / mirror / Atom feed
From: Derrick Stolee <stolee@gmail.com>
To: Ramsay Jones <ramsay@ramsayjones.plus.com>, dstolee@microsoft.com
Cc: Junio C Hamano <gitster@pobox.com>,
	GIT Mailing-list <git@vger.kernel.org>
Subject: Re: [PATCH] test-list-objects: mark file-local symbols as static
Date: Wed, 4 Oct 2017 09:40:15 -0400	[thread overview]
Message-ID: <de2c43ca-2b5c-62e5-80a7-a8513a946558@gmail.com> (raw)
In-Reply-To: <5b3d8899-d4c5-c145-7128-21c8aaa4f38f@ramsayjones.plus.com>

On 10/3/2017 5:51 PM, Ramsay Jones wrote:
> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
> ---
>
> Hi Derrick,
>
> If you need to re-roll your 'ds/find-unique-abbrev-optim' branch,
> could you please squash this into the relevant patch (commit 3792c78ba0,
> "test-list-objects: list a subset of object ids", 01-10-2017).
>
> Thanks!
>
> ATB,
> Ramsay Jones
>
>   t/helper/test-list-objects.c | 32 ++++++++++++++++----------------
>   1 file changed, 16 insertions(+), 16 deletions(-)
>
> diff --git a/t/helper/test-list-objects.c b/t/helper/test-list-objects.c
> index 22bc9b4e6..5c5d3c03f 100644
> --- a/t/helper/test-list-objects.c
> +++ b/t/helper/test-list-objects.c
> @@ -6,43 +6,43 @@ struct count {
>   	int select_mod;
>   };
>   
> -int count_loose(const struct object_id *oid,
> -		const char *path,
> -		void *data)
> +static int count_loose(const struct object_id *oid,
> +		       const char *path,
> +		       void *data)
>   {
>   	((struct count*)data)->total++;
>   	return 0;
>   }
>   
> -int count_packed(const struct object_id *oid,
> -		 struct packed_git *pack,
> -		 uint32_t pos,
> -		 void* data)
> +static int count_packed(const struct object_id *oid,
> +			struct packed_git *pack,
> +			uint32_t pos,
> +			void* data)
>   {
>   	((struct count*)data)->total++;
>   	return 0;
>   }
>   
> -void output(const struct object_id *oid,
> -	    struct count *c)
> +static void output(const struct object_id *oid,
> +		   struct count *c)
>   {
>   	if (!(c->total % c->select_mod))
>   		printf("%s\n", oid_to_hex(oid));
>   	c->total--;
>   }
>   
> -int output_loose(const struct object_id *oid,
> -		 const char *path,
> -		 void *data)
> +static int output_loose(const struct object_id *oid,
> +			const char *path,
> +			void *data)
>   {
>   	output(oid, (struct count*)data);
>   	return 0;
>   }
>   
> -int output_packed(const struct object_id *oid,
> -		  struct packed_git *pack,
> -		  uint32_t pos,
> -		  void* data)
> +static int output_packed(const struct object_id *oid,
> +			 struct packed_git *pack,
> +			 uint32_t pos,
> +			 void* data)
>   {
>   	output(oid, (struct count*)data);
>   	return 0;
Thanks, Ramsay. I applied these changes locally. I'll remember "static" 
in the future.

Thanks,
-Stolee

      reply	other threads:[~2017-10-04 13:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-03 21:51 [PATCH] test-list-objects: mark file-local symbols as static Ramsay Jones
2017-10-04 13:40 ` Derrick Stolee [this message]

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=de2c43ca-2b5c-62e5-80a7-a8513a946558@gmail.com \
    --to=stolee@gmail.com \
    --cc=dstolee@microsoft.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=ramsay@ramsayjones.plus.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.