From fb824f7eb03c10301ad897d9e1eeb0aa40492a3d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 10 Nov 2010 14:15:21 -0400 Subject: [PATCH] use -- before filenames when running git add, git rm, etc --- Command/Add.hs | 2 +- Command/Fix.hs | 2 +- Command/FromKey.hs | 2 +- Command/Move.hs | 4 ++-- Command/Unannex.hs | 2 +- Core.hs | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Command/Add.hs b/Command/Add.hs index 6c5d24f842..649b466bb3 100644 --- a/Command/Add.hs +++ b/Command/Add.hs @@ -44,5 +44,5 @@ cleanup file key = do link <- calcGitLink file key liftIO $ createSymbolicLink link file - Annex.queue "add" [] file + Annex.queue "add" ["--"] file return True diff --git a/Command/Fix.hs b/Command/Fix.hs index 7963a1d2ea..9db832cc76 100644 --- a/Command/Fix.hs +++ b/Command/Fix.hs @@ -37,5 +37,5 @@ perform file link = do cleanup :: FilePath -> SubCmdCleanup cleanup file = do - Annex.queue "add" [] file + Annex.queue "add" ["--"] file return True diff --git a/Command/FromKey.hs b/Command/FromKey.hs index de555475c1..229a93684a 100644 --- a/Command/FromKey.hs +++ b/Command/FromKey.hs @@ -41,5 +41,5 @@ perform file key = do return $ Just $ cleanup file cleanup :: FilePath -> SubCmdCleanup cleanup file = do - Annex.queue "add" [] file + Annex.queue "add" ["--"] file return True diff --git a/Command/Move.hs b/Command/Move.hs index 6ca923a310..e0b079193a 100644 --- a/Command/Move.hs +++ b/Command/Move.hs @@ -85,7 +85,7 @@ moveToCleanup remote key tmpfile = do g <- Annex.gitRepo remoteuuid <- getUUID remote logfile <- liftIO $ logChange g key remoteuuid ValuePresent - Annex.queue "add" [] logfile + Annex.queue "add" ["--"] logfile -- Cleanup on the local side is the same as done for the -- drop subcommand. Command.Drop.cleanup key @@ -128,5 +128,5 @@ moveFromCleanup remote key = do remoteuuid <- getUUID remote g <- Annex.gitRepo logfile <- liftIO $ logChange g key remoteuuid ValueMissing - Annex.queue "add" [] logfile + Annex.queue "add" ["--"] logfile return ok diff --git a/Command/Unannex.hs b/Command/Unannex.hs index a9c18f765e..f5e78e55af 100644 --- a/Command/Unannex.hs +++ b/Command/Unannex.hs @@ -40,7 +40,7 @@ cleanup file key = do g <- Annex.gitRepo liftIO $ removeFile file - liftIO $ Git.run g ["rm", "--quiet", file] + liftIO $ Git.run g ["rm", "--quiet", "--", file] -- git rm deletes empty directories; put them back liftIO $ createDirectoryIfMissing True (parentDir file) diff --git a/Core.hs b/Core.hs index f9c9417bd8..8497a7f368 100644 --- a/Core.hs +++ b/Core.hs @@ -131,7 +131,7 @@ logStatus key status = do g <- Annex.gitRepo u <- getUUID g logfile <- liftIO $ logChange g key u status - Annex.queue "add" [] logfile + Annex.queue "add" ["--"] logfile {- Runs an action, passing it a temporary filename to download, - and if the action succeeds, moves the temp file into @@ -261,5 +261,5 @@ upgradeFrom0 = do link <- calcGitLink f k liftIO $ removeFile f liftIO $ createSymbolicLink link f - Annex.queue "add" [] f + Annex.queue "add" ["--"] f fixlinks fs