summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2010-11-17 13:55:38 -0400
committerGravatar Joey Hess <joey@kitenet.net>2010-11-17 13:55:38 -0400
commit5c7d1b027916ce3fc207329f926041d2bcad3bcd (patch)
tree7d9d3e4f3ac97c688f6ac61ae8ff665f6af030d5
parentab55689164a2fa29af61bce692cfe5df2739b790 (diff)
Fix `git annex add ../foo` (when ran in a subdir of the repo).
There was no reason for Git.relative to be used here.
-rw-r--r--Backend.hs14
-rw-r--r--debian/changelog6
-rw-r--r--doc/bugs/dotdot_problem.mdwn2
3 files changed, 14 insertions, 8 deletions
diff --git a/Backend.hs b/Backend.hs
index 2f0f71d74..f24347ca8 100644
--- a/Backend.hs
+++ b/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. -}
diff --git a/debian/changelog b/debian/changelog
index 252d9ae45..2a8871c30 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -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.
diff --git a/doc/bugs/dotdot_problem.mdwn b/doc/bugs/dotdot_problem.mdwn
index 9d247a9c0..cbefd5dae 100644
--- a/doc/bugs/dotdot_problem.mdwn
+++ b/doc/bugs/dotdot_problem.mdwn
@@ -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]]