abspath: move related functions to abspath

Move abspath-related functions from strbuf.[ch] to abspath.[ch] so that
strbuf is focused on string manipulation routines with minimal
dependencies.

Signed-off-by: Calvin Wan <calvinwan@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Calvin Wan
2023-06-06 19:48:39 +00:00
committed by Junio C Hamano
parent 16b171fda0
commit 5d1344b497
6 changed files with 59 additions and 59 deletions

View File

@ -535,28 +535,6 @@ int strbuf_getwholeline_fd(struct strbuf *sb, int fd, int term);
*/
int strbuf_getcwd(struct strbuf *sb);
/**
* Add a path to a buffer, converting a relative path to an
* absolute one in the process. Symbolic links are not
* resolved.
*/
void strbuf_add_absolute_path(struct strbuf *sb, const char *path);
/**
* Canonize `path` (make it absolute, resolve symlinks, remove extra
* slashes) and append it to `sb`. Die with an informative error
* message if there is a problem.
*
* The directory part of `path` (i.e., everything up to the last
* dir_sep) must denote a valid, existing directory, but the last
* component need not exist.
*
* Callers that don't mind links should use the more lightweight
* strbuf_add_absolute_path() instead.
*/
void strbuf_add_real_path(struct strbuf *sb, const char *path);
/**
* Normalize in-place the path contained in the strbuf. See
* normalize_path_copy() for details. If an error occurs, the contents of "sb"