update
This commit is contained in:
parent
91c9cd2b8e
commit
b3e5590fb2
2 changed files with 7 additions and 2 deletions
|
@ -6,8 +6,8 @@ module Remotes (
|
||||||
tryGitConfigRead
|
tryGitConfigRead
|
||||||
) where
|
) where
|
||||||
|
|
||||||
|
import Control.Exception
|
||||||
import Control.Monad.State (liftIO)
|
import Control.Monad.State (liftIO)
|
||||||
import IO
|
|
||||||
import qualified Data.Map as Map
|
import qualified Data.Map as Map
|
||||||
import Data.String.Utils
|
import Data.String.Utils
|
||||||
import List
|
import List
|
||||||
|
@ -85,7 +85,9 @@ tryGitConfigRead :: Git.Repo -> Annex (Maybe Git.Repo)
|
||||||
tryGitConfigRead r = do
|
tryGitConfigRead r = do
|
||||||
if (Map.null $ Git.configMap r)
|
if (Map.null $ Git.configMap r)
|
||||||
then do
|
then do
|
||||||
result <- liftIO $ try (Git.configRead r)
|
-- configRead can fail due to IO error or
|
||||||
|
-- for other reasons; catch all possible exceptions
|
||||||
|
result <- liftIO $ (try (Git.configRead r)::IO (Either SomeException (Git.Repo)))
|
||||||
case (result) of
|
case (result) of
|
||||||
Left err -> return Nothing
|
Left err -> return Nothing
|
||||||
Right r' -> do
|
Right r' -> do
|
||||||
|
|
3
TODO
3
TODO
|
@ -8,6 +8,9 @@
|
||||||
* Support for remote git repositories (ssh:// specifically can be made to
|
* Support for remote git repositories (ssh:// specifically can be made to
|
||||||
work, although the other end probably needs to have git-annex installed..)
|
work, although the other end probably needs to have git-annex installed..)
|
||||||
|
|
||||||
|
* Copy files atomically, don't leaf a partial key on interrupt.
|
||||||
|
(Fix for URL download too..)
|
||||||
|
|
||||||
* Find a way to copy a file with a progress bar, while still preserving
|
* Find a way to copy a file with a progress bar, while still preserving
|
||||||
stat. Easiest way might be to use pv and fix up the permissions etc
|
stat. Easiest way might be to use pv and fix up the permissions etc
|
||||||
after?
|
after?
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue