From 17d3586e842f0fae5ce9c3783eaf0959cfa005fc Mon Sep 17 00:00:00 2001 From: Adam Spiers Date: Sat, 18 Feb 2012 14:20:07 +0000 Subject: [PATCH] Remove -a option for safety reasons (but keep --adopt). --- NEWS | 9 +++++++++ bin/stow.in | 6 ++---- doc/stow.texi | 3 +-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/NEWS b/NEWS index 2f4f87e..8cfd33a 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,15 @@ News file for Stow. * 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. The error message displayed a path to the missing stow package diff --git a/bin/stow.in b/bin/stow.in index ca91955..45bc0f0 100755 --- a/bin/stow.in +++ b/bin/stow.in @@ -180,8 +180,6 @@ Restow packages (first unstow, then stow again). This is useful for pruning obsolete symlinks from the target tree after updating the software in a package. -=item -a - =item --adopt B This behaviour is specifically intended to alter the @@ -478,7 +476,7 @@ sub process_options { \%options, 'verbose|v:+', 'help|h', 'simulate|n|no', 'version|V', 'compat|p', 'dir|d=s', 'target|t=s', - 'adopt|a', + 'adopt', # clean and pre-compile any regex's at parse time 'ignore=s' => @@ -631,7 +629,7 @@ OPTIONS: if the file is already stowed to another package --override=REGEX Force stowing files beginning with this Perl regex 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. -p, --compat Use legacy algorithm for unstowing diff --git a/doc/stow.texi b/doc/stow.texi index 3576f1a..2d042c3 100644 --- a/doc/stow.texi +++ b/doc/stow.texi @@ -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. @cindex adopting existing files -@item -a -@itemx --adopt +@item --adopt @strong{Warning!} This behaviour is specifically intended to alter the contents of your stow directory. If you do not want that, this option is not for you.