From 9af06670b501a176e6c3b1c0bf08315b314dacc8 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 12 Oct 2014 14:11:29 -0400 Subject: [PATCH] map: Handle .git prefixed remote repos. Closes: #614759 --- Command/Map.hs | 9 +++++---- debian/changelog | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Command/Map.hs b/Command/Map.hs index b1d28113b9..91862ae55b 100644 --- a/Command/Map.hs +++ b/Command/Map.hs @@ -206,14 +206,15 @@ tryScan r sshparams <- Ssh.toRepo r gc [Param sshcmd] liftIO $ pipedconfig "ssh" sshparams where - sshcmd = cddir ++ " && " ++ - "git config --null --list" + sshcmd = "sh -c " ++ shellEscape + (cddir ++ " && " ++ "git config --null --list") dir = Git.repoPath r cddir | "/~" `isPrefixOf` dir = let (userhome, reldir) = span (/= '/') (drop 1 dir) - in "cd " ++ userhome ++ " && cd " ++ shellEscape (drop 1 reldir) - | otherwise = "cd " ++ shellEscape dir + in "cd " ++ userhome ++ " && " ++ cdto (drop 1 reldir) + | otherwise = cdto dir + cdto dir = "if ! cd " ++ shellEscape dir ++ " 2>/dev/null; then cd " ++ shellEscape dir ++ ".git; fi" -- First, try sshing and running git config manually, -- only fall back to git-annex-shell configlist if that diff --git a/debian/changelog b/debian/changelog index fb22c4036b..1faee6522c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ git-annex (5.20140928) UNRELEASED; urgency=medium * Adjust cabal file to support building w/o assistant on the hurd. * Support building with yesod 1.4. * S3: Fix embedcreds=yes handling for the Internet Archive. + * map: Handle .git prefixed remote repos. Closes: #614759 -- Joey Hess Mon, 29 Sep 2014 14:07:51 -0400