Allow find --branch to be used in a bare repository, the same as the deprecated findref can be
This will allow later fully deprecating and removing findref. Sponsored-by: Erik Bjäreholt on Patreon
This commit is contained in:
parent
d8f94389e1
commit
570b1aa6a1
3 changed files with 9 additions and 2 deletions
|
@ -122,7 +122,10 @@ repoExists :: CommandCheck
|
|||
repoExists = CommandCheck 0 ensureInitialized
|
||||
|
||||
notBareRepo :: Command -> Command
|
||||
notBareRepo = addCheck $ whenM (fromRepo Git.repoIsLocalBare) $
|
||||
notBareRepo = addCheck checkNotBareRepo
|
||||
|
||||
checkNotBareRepo :: Annex ()
|
||||
checkNotBareRepo = whenM (fromRepo Git.repoIsLocalBare) $
|
||||
giveup "You cannot run this command in a bare repository."
|
||||
|
||||
noDaemonRunning :: Command -> Command
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue