remove slightly unsafe use of head
If git rev-parse somehow didn't output anything, git-annex would crash here.
This commit is contained in:
parent
99236376e7
commit
5a8add5d55
1 changed files with 1 additions and 1 deletions
|
@ -79,7 +79,7 @@ checkCanUninit recordok =
|
|||
|
||||
current_branch =
|
||||
ifM (inRepo Git.Ref.headExists)
|
||||
( Just . Git.Ref . encodeBS . Prelude.head . lines . decodeBS <$> revhead
|
||||
( headMaybe . map (Git.Ref . encodeBS) . lines . decodeBS <$> revhead
|
||||
, return Nothing
|
||||
)
|
||||
revhead = inRepo $ Git.Command.pipeReadStrict
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue