proxy: for all your direct mode repository munging needs
This allows bypassing the direct mode guard in a safe way to do all sorts of things including git revert, git mv, git checkout ... This commit was sponsored by the WikiMedia Foundation.
This commit is contained in:
parent
c3390f4c98
commit
864086a956
8 changed files with 120 additions and 12 deletions
|
@ -43,6 +43,12 @@ currentUnsafe r = parse . firstLine
|
|||
| null l = Nothing
|
||||
| otherwise = Just $ Git.Ref l
|
||||
|
||||
currentSha :: Repo -> IO (Maybe Git.Sha)
|
||||
currentSha r = go =<< current r
|
||||
where
|
||||
go Nothing = return Nothing
|
||||
go (Just ref) = Git.Ref.sha ref r
|
||||
|
||||
{- Checks if the second branch has any commits not present on the first
|
||||
- branch. -}
|
||||
changed :: Branch -> Branch -> Repo -> IO Bool
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue