path.c: drop git_path_submodule
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>
Jeff King committed
Aug 10, 2015 at 05:36 UTC
07e3070d2aa69b0c8f1da5f103a87125ff4baaea
2 files changed
+2
-13
cache.h
+2
-3
@@ -713,12 +713,11 @@ extern int check_repository_format(void);
713
* the repository directory (git_path), or in a submodule's repository
714
* directory (git_path_submodule). In all cases, note that the result
715
* may be overwritten by another call to _any_ of the functions. Consider
716
- * using the safer "dup" or "strbuf" formats below.
716
+ * using the safer "dup" or "strbuf" formats below (in some cases, the
717
+ * unsafe versions have already been removed).
718
*/
719
extern const char *mkpath(const char *fmt, ...) __attribute__((format (printf, 1, 2)));
720
extern const char *git_path(const char *fmt, ...) __attribute__((format (printf, 1, 2)));
720
-extern const char *git_path_submodule(const char *path, const char *fmt, ...)
721
- __attribute__((format (printf, 2, 3)));
721
722
extern char *mksnpath(char *buf, size_t n, const char *fmt, ...)
723
__attribute__((format (printf, 3, 4)));
path.c
-10
@@ -245,16 +245,6 @@ static void do_submodule_path(struct strbuf *buf, const char *path,
245
strbuf_cleanup_path(buf);
246
}
247
248
-const char *git_path_submodule(const char *path, const char *fmt, ...)
249
-{
250
- va_list args;
251
- struct strbuf *buf = get_pathname();
252
- va_start(args, fmt);
253
- do_submodule_path(buf, path, fmt, args);
254
- va_end(args);
255
- return buf->buf;
256
-}
257
-
248
char *git_pathdup_submodule(const char *path, const char *fmt, ...)
249
{
250
va_list args;