diff options
author | Joey Hess <joey@kitenet.net> | 2013-04-22 16:53:09 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-04-22 16:53:09 -0400 |
commit | 822c2d920882dd7eea8ed551369fa4bb5b26afa3 (patch) | |
tree | b57a4525bfa2dec52823e30e5090a90f69d78741 /Assistant | |
parent | 26264f5fb4e90cdbc5bfc83bbe3d317b19bbf7da (diff) |
assistant: When built with git before 1.8.0, use `git remote rm` to delete a remote. Newer git uses `git remote remove`.
Diffstat (limited to 'Assistant')
-rw-r--r-- | Assistant/DeleteRemote.hs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Assistant/DeleteRemote.hs b/Assistant/DeleteRemote.hs index 25049103e..de3d4124b 100644 --- a/Assistant/DeleteRemote.hs +++ b/Assistant/DeleteRemote.hs @@ -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 |