Skip to content

Commit

Permalink
path.c: drop git_path_submodule
Browse files Browse the repository at this point in the history
There are no callers of the slightly-dangerous static-buffer
git_path_submodule left. Let's drop it.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Jeff King authored and Junio C Hamano committed Aug 10, 2015
1 parent f5b2dec commit 07e3070
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
5 changes: 2 additions & 3 deletions cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -713,12 +713,11 @@ extern int check_repository_format(void);
* the repository directory (git_path), or in a submodule's repository
* directory (git_path_submodule). In all cases, note that the result
* may be overwritten by another call to _any_ of the functions. Consider
* using the safer "dup" or "strbuf" formats below.
* using the safer "dup" or "strbuf" formats below (in some cases, the
* unsafe versions have already been removed).
*/
extern const char *mkpath(const char *fmt, ...) __attribute__((format (printf, 1, 2)));
extern const char *git_path(const char *fmt, ...) __attribute__((format (printf, 1, 2)));
extern const char *git_path_submodule(const char *path, const char *fmt, ...)
__attribute__((format (printf, 2, 3)));

extern char *mksnpath(char *buf, size_t n, const char *fmt, ...)
__attribute__((format (printf, 3, 4)));
Expand Down
10 changes: 0 additions & 10 deletions path.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,16 +245,6 @@ static void do_submodule_path(struct strbuf *buf, const char *path,
strbuf_cleanup_path(buf);
}

const char *git_path_submodule(const char *path, const char *fmt, ...)
{
va_list args;
struct strbuf *buf = get_pathname();
va_start(args, fmt);
do_submodule_path(buf, path, fmt, args);
va_end(args);
return buf->buf;
}

char *git_pathdup_submodule(const char *path, const char *fmt, ...)
{
va_list args;
Expand Down

0 comments on commit 07e3070

Please sign in to comment.