examimekey: Allow being run in a git repo that is not initialized by git-annex yet.

No reason not to; indeed there's no real reason to need a git repository
at all except the implementation uses the Annex monad.
This commit is contained in:
Joey Hess 2016-09-05 12:26:59 -04:00
parent f1a9c5f248
commit 5d70eaacaf
No known key found for this signature in database
GPG key ID: C910D9222512E3C7
2 changed files with 8 additions and 5 deletions

View file

@ -3,6 +3,8 @@ git-annex (6.20160809) UNRELEASED; urgency=medium
* Windows: Handle shebang in external special remote program.
* Fix formatting of git-annex-smudge man page, and improve mdwn2man.
Thanks, Jim Paris.
* examimekey: Allow being run in a git repo that is not initialized by
git-annex yet.
-- Joey Hess <id@joeyh.name> Mon, 05 Sep 2016 11:51:49 -0400

View file

@ -12,11 +12,12 @@ import qualified Utility.Format
import Command.Find (parseFormatOption, showFormatted, keyVars)
cmd :: Command
cmd = noCommit $ noMessages $ withGlobalOptions [jsonOption] $
command "examinekey" SectionPlumbing
"prints information from a key"
(paramRepeating paramKey)
(batchable run (optional parseFormatOption))
cmd = noCommit $ noMessages $ dontCheck repoExists $
withGlobalOptions [jsonOption] $
command "examinekey" SectionPlumbing
"prints information from a key"
(paramRepeating paramKey)
(batchable run (optional parseFormatOption))
run :: Maybe Utility.Format.Format -> String -> Annex Bool
run format p = do