diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2021-07-24 22:06:52 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-07-26 19:17:16 (GMT) |
commit | a03b097d6307763c6778f5a1f194fbcbd158a5f7 (patch) | |
tree | 64e20e92d5b74c31ed5cd324b95545cf220ba12e /path.c | |
parent | 644e6b2c0f55fa52de88586d375e03ac7f7914b7 (diff) | |
download | git-a03b097d6307763c6778f5a1f194fbcbd158a5f7.zip git-a03b097d6307763c6778f5a1f194fbcbd158a5f7.tar.gz git-a03b097d6307763c6778f5a1f194fbcbd158a5f7.tar.bz2 |
Use a better name for the function interpolating paths
It is not immediately clear what `expand_user_path()` means, so let's
rename it to `interpolate_path()`. This also opens the path for
interpolating more than just a home directory.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'path.c')
-rw-r--r-- | path.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -724,7 +724,7 @@ static struct passwd *getpw_str(const char *username, size_t len) * * If real_home is true, strbuf_realpath($HOME) is used in the `~/` expansion. */ -char *expand_user_path(const char *path, int real_home) +char *interpolate_path(const char *path, int real_home) { struct strbuf user_path = STRBUF_INIT; const char *to_copy = path; @@ -811,7 +811,7 @@ const char *enter_repo(const char *path, int strict) strbuf_add(&validated_path, path, len); if (used_path.buf[0] == '~') { - char *newpath = expand_user_path(used_path.buf, 0); + char *newpath = interpolate_path(used_path.buf, 0); if (!newpath) return NULL; strbuf_attach(&used_path, newpath, strlen(newpath), |