import: Let --force overwrite symlinks, not only regular files
The docs already implied this should work.
This commit is contained in:
parent
572a340fc5
commit
5ab97333e4
3 changed files with 9 additions and 1 deletions
|
@ -34,6 +34,7 @@ git-annex (7.20190220) UNRELEASED; urgency=medium
|
|||
* Removed bundled gpg from the Linux standalone build and OSX dmg,
|
||||
because gpg now always wants to use gpg-agent, and shipping such a daemon
|
||||
in those is not a good idea.
|
||||
* import: Let --force overwrite symlinks, not only regular files.
|
||||
|
||||
-- Joey Hess <id@joeyh.name> Wed, 20 Feb 2019 14:20:59 -0400
|
||||
|
||||
|
|
|
@ -146,7 +146,12 @@ startLocal largematcher mode (srcfile, destfile) =
|
|||
Nothing -> importfilechecked ld k
|
||||
Just s
|
||||
| isDirectory s -> notoverwriting "(is a directory)"
|
||||
| isSymbolicLink s -> notoverwriting "(is a symlink)"
|
||||
| isSymbolicLink s -> ifM (Annex.getState Annex.force)
|
||||
( do
|
||||
liftIO $ nukeFile destfile
|
||||
importfilechecked ld k
|
||||
, notoverwriting "(is a symlink)"
|
||||
)
|
||||
| otherwise -> ifM (Annex.getState Annex.force)
|
||||
( do
|
||||
liftIO $ nukeFile destfile
|
||||
|
|
|
@ -1 +1,3 @@
|
|||
`git-annex import --force` does not work on locked files (only unlocked files). Running `7.20181106-g352f88226` on macOS 10.12.6
|
||||
|
||||
> Nicely spotted! [[fixed|done]] --[[Joey]]
|
||||
|
|
Loading…
Add table
Reference in a new issue