# [PATCH] pathspec: removed unnecessary function prototypes

5 messages from 2016-09-13 to 2016-09-14. Participants: Brandon Williams, Jeff King, Junio C Hamano.
Thread: https://gitlist.dev/t/44074

## Brandon Williams, 2016-09-13 16:52

Subject: [PATCH] pathspec: removed unnecessary function prototypes
Message-ID: <1473785571-60439-1-git-send-email-bmwill@google.com>
URL: https://gitlist.dev/e/1473785571-60439-1-git-send-email-bmwill%40google.com

```
removed function prototypes from pathspec.h which don't have a
corresponding implementation.

Signed-off-by: Brandon Williams <bmwill@google.com>
---
 pathspec.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/pathspec.h b/pathspec.h
index 4a80f6f..59809e4 100644
--- a/pathspec.h
+++ b/pathspec.h
@@ -96,7 +96,5 @@ static inline int ps_strcmp(const struct pathspec_item *item,
 
 extern char *find_pathspecs_matching_against_index(const struct pathspec *pathspec);
 extern void add_pathspec_matches_against_index(const struct pathspec *pathspec, char *seen);
-extern const char *check_path_for_gitlink(const char *path);
-extern void die_if_path_beyond_symlink(const char *path, const char *prefix);
 
 #endif /* PATHSPEC_H */
-- 
2.8.0.rc3.226.g39d4020


```

## Jeff King, 2016-09-13 18:15

Subject: Re: [PATCH] pathspec: removed unnecessary function prototypes
Message-ID: <20160913181552.74bhacoa2q76yv6k@sigill.intra.peff.net>
URL: https://gitlist.dev/e/20160913181552.74bhacoa2q76yv6k%40sigill.intra.peff.net
In-Reply-To: <1473785571-60439-1-git-send-email-bmwill@google.com>

```
On Tue, Sep 13, 2016 at 09:52:51AM -0700, Brandon Williams wrote:

> removed function prototypes from pathspec.h which don't have a
> corresponding implementation.

I'm always curious of the "why" in cases like this. Did we forget to add
them? Did they get renamed? Did they go away?

Looks like the latter; 5a76aff (add: convert to use parse_pathspec,
2013-07-14) just forgot to remove them.

-Peff

```

## Junio C Hamano, 2016-09-13 23:08

Subject: Re: [PATCH] pathspec: removed unnecessary function prototypes
Message-ID: <xmqqh99jtn33.fsf@gitster.mtv.corp.google.com>
URL: https://gitlist.dev/e/xmqqh99jtn33.fsf%40gitster.mtv.corp.google.com
In-Reply-To: <20160913181552.74bhacoa2q76yv6k@sigill.intra.peff.net>

```
Jeff King <peff@peff.net> writes:

> On Tue, Sep 13, 2016 at 09:52:51AM -0700, Brandon Williams wrote:
>
>> removed function prototypes from pathspec.h which don't have a
>> corresponding implementation.
>
> I'm always curious of the "why" in cases like this. Did we forget to add
> them? Did they get renamed? Did they go away?
>
> Looks like the latter; 5a76aff (add: convert to use parse_pathspec,
> 2013-07-14) just forgot to remove them.

Thanks for digging.

```

## Jeff King, 2016-09-14 19:23

Subject: Re: [PATCH] pathspec: removed unnecessary function prototypes
Message-ID: <20160914192341.mgpcc35kgmjqunbh@sigill.intra.peff.net>
URL: https://gitlist.dev/e/20160914192341.mgpcc35kgmjqunbh%40sigill.intra.peff.net
In-Reply-To: <20160913181552.74bhacoa2q76yv6k@sigill.intra.peff.net>

```
On Tue, Sep 13, 2016 at 11:15:52AM -0700, Jeff King wrote:

> On Tue, Sep 13, 2016 at 09:52:51AM -0700, Brandon Williams wrote:
> 
> > removed function prototypes from pathspec.h which don't have a
> > corresponding implementation.
> 
> I'm always curious of the "why" in cases like this. Did we forget to add
> them? Did they get renamed? Did they go away?
> 
> Looks like the latter; 5a76aff (add: convert to use parse_pathspec,
> 2013-07-14) just forgot to remove them.

I should have done a better job of not just providing the answer, but
showing how. The easiest tool here is "git log -S":

  git log -1 -p -Scheck_path_for_gitlink

(and then you can see that the whole function went away there).

-Peff

```

## Brandon Williams, 2016-09-14 19:30

Subject: Re: [PATCH] pathspec: removed unnecessary function prototypes
Message-ID: <CAKoko1qKLPWZEZxzHkrpm-tvz4oLMf=odRLNSRgrHXPxGhHFvg@mail.gmail.com>
URL: https://gitlist.dev/e/CAKoko1qKLPWZEZxzHkrpm-tvz4oLMf%3DodRLNSRgrHXPxGhHFvg%40mail.gmail.com
In-Reply-To: <20160914192341.mgpcc35kgmjqunbh@sigill.intra.peff.net>

```
On Wed, Sep 14, 2016 at 12:23 PM, Jeff King <peff@peff.net> wrote:

> On Tue, Sep 13, 2016 at 11:15:52AM -0700, Jeff King wrote:
> I should have done a better job of not just providing the answer, but
> showing how. The easiest tool here is "git log -S":
>
>   git log -1 -p -Scheck_path_for_gitlink
>
> (and then you can see that the whole function went away there).
>
> -Peff

Perfect thanks! There's still a lot of little features like this that
I'm unaware
of so I really appreciate the pointer.

-Brandon

```
