Skip to contentSkip to conversation

pathspec: removed unnecessary function prototypes

PATCH In review Brandon Williams 3 participants 5 messages Sep 13, 2016 – Sep 14, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pathspec: removed unnecessary function prototypes

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

---
 pathspec.h | 2 --
 1 file changed, 2 deletions(-)
pathspec.h +0 -2
index 4a80f6f..59809e4 100644
@@ -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 */
Signature · 1 line
2.8.0.rc3.226.g39d4020
#1 lore raw
Quoted 2 lines · Brandon Williams

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

#2 lore raw
Quoted 10 lines · Jeff King
Quoted 2 lines · Brandon Williams

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.

#3 lore raw
In reply to Jeff King
Quoted 10 lines · Jeff King
Quoted 2 lines · Brandon Williams

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

#4 lore raw
Quoted 9 lines · Jeff King

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