Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[refactoring] Factorizing a match case with darcs

  • Loading branch information...
commit 24456f0bfaea4c992410f0a0d30147d18470fa0d 1 parent 5f6827f
@venator authored
Showing with 1 addition and 6 deletions.
  1. +1 −6 src/client/opamState.ml
View
7 src/client/opamState.ml
@@ -778,16 +778,11 @@ let install_compiler t ~quiet switch compiler =
let update_pinned_package t nv pin =
match kind_of_pin_option pin with
- | (`git|`local as k) ->
+ | (`git|`darcs|`local as k) ->
let path = OpamFilename.raw_dir (path_of_pin_option pin) in
let module B = (val OpamRepository.find_backend k: OpamRepository.BACKEND) in
let build = OpamPath.Switch.build t.root t.switch nv in
B.download_dir nv ~dst:build path
- | `darcs ->
- let path = OpamFilename.raw_dir (path_of_pin_option pin) in
- let module B = (val OpamRepository.find_backend `darcs: OpamRepository.BACKEND) in
- let build = OpamPath.Switch.build t.root t.switch nv in
- B.download_dir nv ~dst:build path
| _ ->
OpamGlobals.error_and_exit
"Cannot update the pinned package %s: wrong backend."
Please sign in to comment.
Something went wrong with that request. Please try again.