summaryrefslogtreecommitdiff
path: root/Annex/AdjustedBranch.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Annex/AdjustedBranch.hs')
-rw-r--r--Annex/AdjustedBranch.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/Annex/AdjustedBranch.hs b/Annex/AdjustedBranch.hs
index 357e70e2f..b2ca7dbf6 100644
--- a/Annex/AdjustedBranch.hs
+++ b/Annex/AdjustedBranch.hs
@@ -12,6 +12,7 @@ module Annex.AdjustedBranch (
originalToAdjusted,
adjustedToOriginal,
fromAdjustedBranch,
+ getAdjustment,
enterAdjustedBranch,
updateAdjustedBranch,
propigateAdjustedCommits,
@@ -45,7 +46,7 @@ data Adjustment
| LockAdjustment
| HideMissingAdjustment
| ShowMissingAdjustment
- deriving (Show)
+ deriving (Show, Eq)
reverseAdjustment :: Adjustment -> Adjustment
reverseAdjustment UnlockAdjustment = LockAdjustment
@@ -122,6 +123,9 @@ adjustedToOriginal b
bs = fromRef b
prefixlen = length adjustedBranchPrefix
+getAdjustment :: Branch -> Maybe Adjustment
+getAdjustment = fmap fst . adjustedToOriginal
+
fromAdjustedBranch :: Branch -> OrigBranch
fromAdjustedBranch b = maybe b snd (adjustedToOriginal b)