From b88637fff10d4d845404882e4ec95cfc071dcac0 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 3 Mar 2011 16:22:53 -0400 Subject: prevent trust commands from trying to do things in a bare repo Since they need to stage changes, they would actually, if allowed to run, succeed, but wipe out existing trust.log content. --- Command/Semitrust.hs | 2 +- Command/Trust.hs | 2 +- Command/Untrust.hs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'Command') diff --git a/Command/Semitrust.hs b/Command/Semitrust.hs index a91d25359..13c6847e1 100644 --- a/Command/Semitrust.hs +++ b/Command/Semitrust.hs @@ -22,7 +22,7 @@ seek :: [CommandSeek] seek = [withString start] start :: CommandStartString -start name = do +start name = notBareRepo $ do showStart "semitrust" name Remotes.readConfigs r <- Remotes.byName name diff --git a/Command/Trust.hs b/Command/Trust.hs index 3fbff68b8..ea661da2a 100644 --- a/Command/Trust.hs +++ b/Command/Trust.hs @@ -22,7 +22,7 @@ seek :: [CommandSeek] seek = [withString start] start :: CommandStartString -start name = do +start name = notBareRepo $ do showStart "trust" name Remotes.readConfigs r <- Remotes.byName name diff --git a/Command/Untrust.hs b/Command/Untrust.hs index 69d0ab391..fdf9a83de 100644 --- a/Command/Untrust.hs +++ b/Command/Untrust.hs @@ -22,7 +22,7 @@ seek :: [CommandSeek] seek = [withString start] start :: CommandStartString -start name = do +start name = notBareRepo $ do showStart "untrust" name Remotes.readConfigs r <- Remotes.byName name -- cgit v1.2.3