Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
path.c: drop git_path_submodule
author
Jeff King
<peff@peff.net>
Mon, 10 Aug 2015 09:36:27 +0000
(
05:36
-0400)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 10 Aug 2015 22:37:13 +0000
(15:37 -0700)
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>
cache.h
patch
|
blob
|
history
path.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
f5b2dec
)
diff --git
a/cache.h
b/cache.h
index 6f74f33f41f5af40367b6abb32c338b5ff26bcef..7a4fa90e8ccb50edc830686194c0f707037ffdb1 100644
(file)
--- a/
cache.h
+++ b/
cache.h
@@
-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
* 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 *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)));
extern char *mksnpath(char *buf, size_t n, const char *fmt, ...)
__attribute__((format (printf, 3, 4)));
diff --git
a/path.c
b/path.c
index 9aad9a1878024fecd72f082ac4bf49aba40bfe23..94d7ec24e84d21027c541795390d121953b43b45 100644
(file)
--- a/
path.c
+++ b/
path.c
@@
-245,16
+245,6
@@
static void do_submodule_path(struct strbuf *buf, const char *path,
strbuf_cleanup_path(buf);
}
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;
char *git_pathdup_submodule(const char *path, const char *fmt, ...)
{
va_list args;