diff options
author | Junio C Hamano <gitster@pobox.com> | 2024-07-30 11:43:50 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-07-30 11:47:59 -0700 |
commit | 7f547c99a627bca120bf44abf3dd95c8837dfdfa (patch) | |
tree | 085a6be2f07d0b03b055682cca41500a9c7b41c9 /merge-blobs.c | |
parent | 1048aa8b7ad44d6c759e894f6ca763614068514d (diff) |
safe.directory: normalize the checked path
The pathname of a repository comes from getcwd() and it could be a
path aliased via symbolic links, e.g., the real directory may be
/home/u/repository but a symbolic link /home/u/repo may point at it,
and the clone request may come as "git clone file:///home/u/repo/".
A request to check if /home/u/repo is safe would be rejected if the
safe.directory configuration allows /home/u/repository/ but not its
alias /home/u/repo/. Normalize the path being checked before
comparing with safe.directory value(s).
Suggested-by: Phillip Wood <phillip.wood123@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'merge-blobs.c')
0 files changed, 0 insertions, 0 deletions