From 4f6c8222072ace33e3acedddd31637089ae474b6 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 5 Nov 2013 16:42:59 -0400 Subject: v5 for direct mode, with automatic upgrade This includes storing the current state of the HEAD ref, which git annex sync is going to need, but does not make sync use it. --- Git/Ref.hs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Git') diff --git a/Git/Ref.hs b/Git/Ref.hs index 954b61a2e..9706f8b6c 100644 --- a/Git/Ref.hs +++ b/Git/Ref.hs @@ -40,6 +40,11 @@ exists :: Ref -> Repo -> IO Bool exists ref = runBool [Param "show-ref", Param "--verify", Param "-q", Param $ show ref] +{- The file used to record a ref. (Git also stores some refs in a + - packed-refs file.) -} +file :: Ref -> Repo -> FilePath +file ref repo = localGitDir repo show ref + {- Checks if HEAD exists. It generally will, except for in a repository - that was just created. -} headExists :: Repo -> IO Bool -- cgit v1.2.3