Fix git annex add ../foo
(when ran in a subdir of the repo).
There was no reason for Git.relative to be used here.
This commit is contained in:
parent
ab55689164
commit
5c7d1b0279
3 changed files with 14 additions and 8 deletions
14
Backend.hs
14
Backend.hs
|
@ -79,17 +79,15 @@ maybeLookupBackendName bs s =
|
|||
{- Attempts to store a file in one of the backends. -}
|
||||
storeFileKey :: FilePath -> Maybe Backend -> Annex (Maybe (Key, Backend))
|
||||
storeFileKey file trybackend = do
|
||||
g <- Annex.gitRepo
|
||||
let relfile = Git.relative g file
|
||||
bs <- list
|
||||
let bs' = case trybackend of
|
||||
Nothing -> bs
|
||||
Just backend -> backend:bs
|
||||
storeFileKey' bs' file relfile
|
||||
storeFileKey' :: [Backend] -> FilePath -> FilePath -> Annex (Maybe (Key, Backend))
|
||||
storeFileKey' [] _ _ = return Nothing
|
||||
storeFileKey' (b:bs) file relfile = do
|
||||
result <- (Internals.getKey b) relfile
|
||||
storeFileKey' bs' file
|
||||
storeFileKey' :: [Backend] -> FilePath -> Annex (Maybe (Key, Backend))
|
||||
storeFileKey' [] _ = return Nothing
|
||||
storeFileKey' (b:bs) file = do
|
||||
result <- (Internals.getKey b) file
|
||||
case result of
|
||||
Nothing -> nextbackend
|
||||
Just key -> do
|
||||
|
@ -98,7 +96,7 @@ storeFileKey' (b:bs) file relfile = do
|
|||
then nextbackend
|
||||
else return $ Just (key, b)
|
||||
where
|
||||
nextbackend = storeFileKey' bs file relfile
|
||||
nextbackend = storeFileKey' bs file
|
||||
|
||||
{- Attempts to retrieve an key from one of the backends, saving it to
|
||||
- a specified location. -}
|
||||
|
|
6
debian/changelog
vendored
6
debian/changelog
vendored
|
@ -1,3 +1,9 @@
|
|||
git-annex (0.08) UNRELEASED; urgency=low
|
||||
|
||||
* Fix `git annex add ../foo` (when ran in a subdir of the repo).
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Wed, 17 Nov 2010 13:54:49 -0400
|
||||
|
||||
git-annex (0.07) unstable; urgency=low
|
||||
|
||||
* find: New subcommand.
|
||||
|
|
|
@ -1,2 +1,4 @@
|
|||
cannot "git annex ../foo" (GitRepo.relative is buggy and
|
||||
git-ls-files also refuses w/o --full-name, which would need other changes)
|
||||
|
||||
[[done]]
|
||||
|
|
Loading…
Reference in a new issue