Skip to content

Commit 644e6b2

Browse files
dschogitster
authored andcommitted
expand_user_path(): clarify the role of the real_home parameter
The `real_home` parameter only has an effect when expanding paths starting with `~/`, not when expanding paths starting with `~<user>/`. Let's make that clear. Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 789f6f2 commit 644e6b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

path.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,7 @@ static struct passwd *getpw_str(const char *username, size_t len)
722722
* Return a string with ~ and ~user expanded via getpw*. Returns NULL on getpw
723723
* failure or if path is NULL.
724724
*
725-
* If real_home is true, strbuf_realpath($HOME) is used in the expansion.
725+
* If real_home is true, strbuf_realpath($HOME) is used in the `~/` expansion.
726726
*/
727727
char *expand_user_path(const char *path, int real_home)
728728
{

0 commit comments

Comments
 (0)