File: GitLsRemoteWithRef.hs

package info (click to toggle)
haskell-github 0.4.0-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 452 kB
  • sloc: haskell: 2,286; makefile: 2
file content (13 lines) | stat: -rw-r--r-- 437 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
module GitLsRemoteWithRef where

import qualified Github.GitData.References as Github

main = do
  possibleReference <- Github.reference "mike-burns" "github" "heads/master"
  putStrLn $ either (\e -> "Error: " ++ show e)
                    formatReference
                    possibleReference

formatReference reference =
  (Github.gitObjectSha $ Github.gitReferenceObject reference) ++
    "\t" ++ (Github.gitReferenceRef reference)