unused: Skip the refs/annex/last-index ref that git-annex recently started creating

This was unlikely to cause any problem, but it is unsightly to mention
normally hidden refs, and it might have done a bit of unnecessary work to
check that ref.

Sponsored-by: Noam Kremen on Patreon
This commit is contained in:
Joey Hess 2021-08-24 12:58:14 -04:00
parent 21d608a276
commit f9b92c81f6
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 3 additions and 0 deletions

View file

@ -12,6 +12,8 @@ git-annex (8.20210804) UNRELEASED; urgency=medium
instead of in a separate pass at the end. This is supported for all
special remotes on Linux (except for bittorrent), and for many
on other OS's (except for adb, external, gcrypt, hook, and rsync).
* unused: Skip the refs/annex/last-index ref that git-annex recently
started creating.
-- Joey Hess <id@joeyh.name> Tue, 03 Aug 2021 12:22:45 -0400

View file

@ -241,6 +241,7 @@ withKeysReferencedDiffGitRefs refspec a = do
ourbranchend = S.cons (fromIntegral (ord '/')) (Git.fromRef' Annex.Branch.name)
ourbranches (_, b) = not (ourbranchend `S.isSuffixOf` b)
&& not ("refs/synced/" `S.isPrefixOf` b)
&& not ("refs/annex/" `S.isPrefixOf` b)
&& not (is_branchView (Git.Ref b))
getreflog rs = inRepo $ Git.RefLog.getMulti rs