Remove -a option for safety reasons (but keep --adopt).

This commit is contained in:
Adam Spiers 2012-02-18 14:20:07 +00:00
parent a127d22457
commit 17d3586e84
3 changed files with 12 additions and 6 deletions

9
NEWS
View file

@ -2,6 +2,15 @@ News file for Stow.
* Changes in version 2.1.4 * Changes in version 2.1.4
** Remove -a option (--adopt still available)
As --adopt is the only option which allows stow to modify files, it
is considered potentially dangerous (especially for stow package
directories which are not managed by a version control system).
Therefore it seems prudent to require a bit more effort from the
user to enable this option, minimising the change of enabling it
via a typo.
** Improve error message when stow package is not found. ** Improve error message when stow package is not found.
The error message displayed a path to the missing stow package The error message displayed a path to the missing stow package

View file

@ -180,8 +180,6 @@ Restow packages (first unstow, then stow again). This is useful
for pruning obsolete symlinks from the target tree after updating for pruning obsolete symlinks from the target tree after updating
the software in a package. the software in a package.
=item -a
=item --adopt =item --adopt
B<Warning!> This behaviour is specifically intended to alter the B<Warning!> This behaviour is specifically intended to alter the
@ -478,7 +476,7 @@ sub process_options {
\%options, \%options,
'verbose|v:+', 'help|h', 'simulate|n|no', 'verbose|v:+', 'help|h', 'simulate|n|no',
'version|V', 'compat|p', 'dir|d=s', 'target|t=s', 'version|V', 'compat|p', 'dir|d=s', 'target|t=s',
'adopt|a', 'adopt',
# clean and pre-compile any regex's at parse time # clean and pre-compile any regex's at parse time
'ignore=s' => 'ignore=s' =>
@ -631,7 +629,7 @@ OPTIONS:
if the file is already stowed to another package if the file is already stowed to another package
--override=REGEX Force stowing files beginning with this Perl regex --override=REGEX Force stowing files beginning with this Perl regex
if the file is already stowed to another package if the file is already stowed to another package
-a, --adopt (Use with care!) Import existing files into stow package --adopt (Use with care!) Import existing files into stow package
from target. Please read docs before using. from target. Please read docs before using.
-p, --compat Use legacy algorithm for unstowing -p, --compat Use legacy algorithm for unstowing

View file

@ -328,8 +328,7 @@ The regular expression is anchored to the beginning of the path relative to
the target directory, because this is what you will want to do most of the time. the target directory, because this is what you will want to do most of the time.
@cindex adopting existing files @cindex adopting existing files
@item -a @item --adopt
@itemx --adopt
@strong{Warning!} This behaviour is specifically intended to alter the @strong{Warning!} This behaviour is specifically intended to alter the
contents of your stow directory. If you do not want that, this option contents of your stow directory. If you do not want that, this option
is not for you. is not for you.