summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Command.hs13
-rw-r--r--Command/Find.hs2
-rw-r--r--Command/Fsck.hs2
-rw-r--r--Command/Uninit.hs2
-rw-r--r--doc/git-annex.mdwn4
5 files changed, 6 insertions, 17 deletions
diff --git a/Command.hs b/Command.hs
index 31bb1f1f9..9fafb18ef 100644
--- a/Command.hs
+++ b/Command.hs
@@ -174,19 +174,6 @@ backendPairs a files = do
pairs <- Backend.chooseBackends files
return $ map a pairs
-{- Default to acting on all files matching the seek action if
- - none are specified. -}
-withAll :: (a -> CommandSeek) -> a -> CommandSeek
-withAll w a [] = do
- g <- Annex.gitRepo
- w a [Git.workTree g]
-withAll w a p = w a p
-
-{- Provides a default parameter to act on if none is specified. -}
-withDefault :: String-> (a -> CommandSeek) -> (a -> CommandSeek)
-withDefault d w a [] = w a [d]
-withDefault _ w a p = w a p
-
{- Filter out files from the state directory, and those matching the
- exclude glob pattern, if it was specified. -}
filterFiles :: [FilePath] -> Annex [FilePath]
diff --git a/Command/Find.hs b/Command/Find.hs
index 7cb781ce8..6d94ea3f4 100644
--- a/Command/Find.hs
+++ b/Command/Find.hs
@@ -18,7 +18,7 @@ command = [Command "find" (paramOptional $ paramRepeating paramPath) seek
"lists available files"]
seek :: [CommandSeek]
-seek = [withDefault "." withFilesInGit start]
+seek = [withFilesInGit start]
{- Output a list of files. -}
start :: CommandStartString
diff --git a/Command/Fsck.hs b/Command/Fsck.hs
index d870bd419..662c281c2 100644
--- a/Command/Fsck.hs
+++ b/Command/Fsck.hs
@@ -18,7 +18,7 @@ command = [Command "fsck" (paramOptional $ paramRepeating paramPath) seek
"check for problems"]
seek :: [CommandSeek]
-seek = [withAll (withAttrFilesInGit "annex.numcopies") start]
+seek = [withAttrFilesInGit "annex.numcopies" start]
{- Checks a file's backend data for problems. -}
start :: CommandStartAttrFile
diff --git a/Command/Uninit.hs b/Command/Uninit.hs
index 1a4e9b0d7..93465df37 100644
--- a/Command/Uninit.hs
+++ b/Command/Uninit.hs
@@ -25,7 +25,7 @@ command = [Command "uninit" paramPath seek
"de-initialize git-annex and clean out repository"]
seek :: [CommandSeek]
-seek = [withAll withFilesInGit Command.Unannex.start, withNothing start]
+seek = [withFilesInGit Command.Unannex.start, withNothing start]
start :: CommandStartNothing
start = do
diff --git a/doc/git-annex.mdwn b/doc/git-annex.mdwn
index 6d106fea4..51a31ae15 100644
--- a/doc/git-annex.mdwn
+++ b/doc/git-annex.mdwn
@@ -59,7 +59,9 @@ content from the key-value store.
Like many git commands, git-annex can be passed a path that
is either a file or a directory. In the latter case it acts on all relevant
-files in the directory.
+files in the directory. If no path is specified, most git-annex commands
+default to acting on all relevant files in the current directory (and
+subdirectories).
Many git-annex commands will stage changes for later `git commit` by you.