mv may become confusing sometimes.
There are two alternatives to a
mv command with two arguments:
mv one two
One, and the default, is to move the file
one into the directory
two doesn't exist, then
mv one two may be interpreted as move the file
one to the file
two (a rename). Of course, if file
two already exists, the user may be prompted if he wants to overwrite it (or other options).
It seems that when the option
--strip-trailing-slash is used, the meaning is lock into move
one file into a directory (not a rename).
If you still want to rename a directory while using
--strip-trailing-slash, you must declare that there is no directory:
mv -T one two
$ mkdir one
$ ln -s one two
$ mv two/ yes
mv: cannot move 'two/' to 'yes': Not a directory
$ mv --strip-trailing-slash two/ yes
mv: cannot move 'two' to 'yes': Not a directory
$ mv -T --strip-trailing-slash two/ yes
$ ls -la
drwxr-xr-x 3 isaac isaac 4096 Jul 01 03:38 .
drwxr-xr-x 6 isaac isaac 4096 Jul 01 03:37 ..
drwxr-xr-x 2 isaac isaac 4096 Jul 01 03:38 one
lrwxrwxrwx 1 isaac isaac 3 Jul 01 03:38 yes -> one