threads / patch / 44074

patchpathspec: removed unnecessary function prototypes

Subject: [PATCH] pathspec: removed unnecessary function prototypes

## tl;dr

5 messages between Sep 13, 2016 and Sep 14, 2016. Diffs are folded; open one to read it.

replies: 4people: 3as markdown or json

Brandon Williams· Sep 13, 2016, 16:52 UTC · lore

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(-)
Show changes to pathspec.h +0 −2
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· Sep 13, 2016, 18:15 UTC · re: Brandon Williams · lore

Re: [PATCH] pathspec: removed unnecessary function prototypes

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· Sep 13, 2016, 23:08 UTC · re: Jeff King · lore

Re: [PATCH] pathspec: removed unnecessary function prototypes

Jeff King <peff@peff.net> writes:
Show 10 quoted lines
> 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· Sep 14, 2016, 19:23 UTC · re: Jeff King · lore

Re: [PATCH] pathspec: removed unnecessary function prototypes

On Tue, Sep 13, 2016 at 11:15:52AM -0700, Jeff King wrote:
Show 10 quoted lines
> 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· Sep 14, 2016, 19:30 UTC · re: Jeff King · lore

Re: [PATCH] pathspec: removed unnecessary function prototypes

On Wed, Sep 14, 2016 at 12:23 PM, Jeff King <peff@peff.net> wrote:
Show 9 quoted lines
> 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

← back to recent threads