# [PATCH] attr: mark a file-local symbol as static

2 messages from 2016-11-13 to 2016-11-14. Participants: Ramsay Jones, Stefan Beller.
Thread: https://gitlist.dev/t/44477

## Ramsay Jones, 2016-11-13 16:42

Subject: [PATCH] attr: mark a file-local symbol as static
Message-ID: <83508d1f-e809-f6be-5afc-4c23195dbd08@ramsayjones.plus.com>
URL: https://gitlist.dev/e/83508d1f-e809-f6be-5afc-4c23195dbd08%40ramsayjones.plus.com

```

Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
---

Hi Stefan,

If you need to re-roll your 'sb/attr' branch, could you please
squash this into the relevant patch.

Alternatively, since there is only a single call site for git_attr()
(on line #1005), you could perhaps remove git_attr() and inline that
call. (However, that does make that line exceed 80 columns).

Thanks!

ATB,
Ramsay Jones

 attr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/attr.c b/attr.c
index 667ba85..84c4b08 100644
--- a/attr.c
+++ b/attr.c
@@ -169,7 +169,7 @@ static struct git_attr *git_attr_internal(const char *name, int len)
 	return a;
 }
 
-struct git_attr *git_attr(const char *name)
+static struct git_attr *git_attr(const char *name)
 {
 	return git_attr_internal(name, strlen(name));
 }
-- 
2.10.0

```

## Stefan Beller, 2016-11-14 20:00

Subject: Re: [PATCH] attr: mark a file-local symbol as static
Message-ID: <CAGZ79kaDK3syiNKvAKQf8q6AtcoXZuFz8fvxGZTj2Ced+Hu3Pg@mail.gmail.com>
URL: https://gitlist.dev/e/CAGZ79kaDK3syiNKvAKQf8q6AtcoXZuFz8fvxGZTj2Ced%2BHu3Pg%40mail.gmail.com
In-Reply-To: <83508d1f-e809-f6be-5afc-4c23195dbd08@ramsayjones.plus.com>

```
On Sun, Nov 13, 2016 at 8:42 AM, Ramsay Jones
<ramsay@ramsayjones.plus.com> wrote:
>
> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
> ---
>
> Hi Stefan,
>
> If you need to re-roll your 'sb/attr' branch, could you please
> squash this into the relevant patch.

will do. I have it applied locally

>
> Alternatively, since there is only a single call site for git_attr()
> (on line #1005), you could perhaps remove git_attr() and inline that
> call. (However, that does make that line exceed 80 columns).

I'll look into that.

Thanks,
Stefan

>
> Thanks!
>
> ATB,
> Ramsay Jones
>
>  attr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/attr.c b/attr.c
> index 667ba85..84c4b08 100644
> --- a/attr.c
> +++ b/attr.c
> @@ -169,7 +169,7 @@ static struct git_attr *git_attr_internal(const char *name, int len)
>         return a;
>  }
>
> -struct git_attr *git_attr(const char *name)
> +static struct git_attr *git_attr(const char *name)
>  {
>         return git_attr_internal(name, strlen(name));
>  }
> --
> 2.10.0

```
