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:
Joey Hess 2013-05-21 18:24:29 -04:00
parent 700d5683a9
commit 08c03b2af3
11 changed files with 77 additions and 27 deletions

View file

@ -46,7 +46,10 @@ diffTreeRecursive src dst = getdiff (Param "diff-tree")
diffIndex :: Repo -> IO ([DiffTreeItem], IO Bool)
diffIndex repo = do
ifM (Git.Ref.headExists repo)
( getdiff (Param "diff-index") [Param "--cached", Param "HEAD"] repo
( getdiff (Param "diff-index")
[ Param "--cached"
, Param $ show Git.Ref.headRef
] repo
, return ([], return True)
)