On 01/11/2025 11:58, Bruno Haible via Gnulib discussion list wrote:
Hi,
Patrick GARCIA wrote:
I did not manage to use "vc-dwim" properly.
vc-dwim is used to create a ChangeLog entry. When you provide a patch
with a reasonable git commit message, we can easily turn that into
a ChangeLog entry. Therefore, no real need to use 'vc-dwim'.
When you propose a patch, you should provide an explanation regarding
the situation where it provides an improvement.
- Which OS? I guess GNU/Linux, but you should better state that
explicitly.
- What are the "How to reproduce" instructions?
Your git commit message gives only partial answers:
- What do you mean by "logical" file name resolution?
- "NOLINKS" flag - what do you mean by that?
- "current-directory is a sybolic-link" - what do you mean by that?
When a process enters a directory via chdir(), is follows symbolic
links. Therefore the current directory is _never_ a symbolic link,
it is _always_ a real directory.
PS : I will, then, propose a shell unit-test to the coreutils team.
Ideally, since Gnulib is a C functions library, the unit test should
be a small self-contained C program. That test program lives in
gnulib/tests/.
It's generally best to describe the intent at as high a level as possible.
In other words the coreutils unit test would be useful in reviewing this change.
I think you want to support this use case:
$ ln -s / root $ cd root
$ realpath .
/
$ env pwd
/
$ env pwd -L
/home/padraig/root
$ realpath -Ls . # You'd like to change this to be like pwd -L
/
$ cd
$ realpath -Lsm ./foo/../root/./././
/home/padraig/root
That does make some sense given the description of -Ls in realpath(1),
but I've also wondering about the exact need you have for this.
I suppose it would at least make the last two realpath invocations consistent.
Having not thought too much about either case,
this does seem sem-related to this request:
https://github.com/coreutils/coreutils/issues/114
thanks,
Padraig