assistant: When built with git before 1.8.0, use git remote rm to delete a remote. Newer git uses git remote remove.

This commit is contained in:
Joey Hess 2013-04-22 16:53:09 -04:00
parent 9ca9c1f747
commit 450baa02e9
3 changed files with 17 additions and 1 deletions

View file

@ -18,6 +18,7 @@ import Assistant.DaemonStatus
import qualified Remote
import Remote.List
import qualified Git.Command
import qualified Git.Version
import Logs.Trust
import qualified Annex
@ -36,7 +37,11 @@ disableRemote uuid = do
liftAnnex $ do
inRepo $ Git.Command.run
[ Param "remote"
, Param "remove"
-- name of this subcommand changed
, Param $
if Git.Version.older "1.8.0"
then "rm"
else "remove"
, Param (Remote.name remote)
]
void $ remoteListRefresh