Upgrading a direct mode repository to v6 has changed to enter an adjusted unlocked branch.
This makes the direct mode to v6 upgrade able to be performed in one clone of a repository without affecting other clones, which can continue using v5 and direct mode.
This commit is contained in:
parent
c7b06b879b
commit
c3e0859846
7 changed files with 54 additions and 43 deletions
|
@ -18,6 +18,12 @@ import Data.Char (chr)
|
|||
headRef :: Ref
|
||||
headRef = Ref "HEAD"
|
||||
|
||||
headFile :: Repo -> FilePath
|
||||
headFile r = localGitDir r </> "HEAD"
|
||||
|
||||
setHeadRef :: Ref -> Repo -> IO ()
|
||||
setHeadRef ref r = writeFile (headFile r) ("ref: " ++ fromRef ref)
|
||||
|
||||
{- Converts a fully qualified git ref into a user-visible string. -}
|
||||
describe :: Ref -> String
|
||||
describe = fromRef . base
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue