XMPP: Avoid redundant and unncessary pushes. Note that this breaks compatibility with previous versions of git-annex, which will refuse to accept any XMPP pushes from this version.
This commit is contained in:
parent
700d5683a9
commit
08c03b2af3
11 changed files with 77 additions and 27 deletions
|
@ -13,6 +13,7 @@ import Common
|
|||
import Git
|
||||
import Git.Sha
|
||||
import Git.Command
|
||||
import Git.Ref (headRef)
|
||||
|
||||
{- The currently checked out branch.
|
||||
-
|
||||
|
@ -35,7 +36,7 @@ current r = do
|
|||
{- The current branch, which may not really exist yet. -}
|
||||
currentUnsafe :: Repo -> IO (Maybe Git.Ref)
|
||||
currentUnsafe r = parse . firstLine
|
||||
<$> pipeReadStrict [Param "symbolic-ref", Param "HEAD"] r
|
||||
<$> pipeReadStrict [Param "symbolic-ref", Param $ show headRef] r
|
||||
where
|
||||
parse l
|
||||
| null l = Nothing
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue