unused: Skip the refs/annex/last-index ref that git-annex recently started creating
authorJoey Hess <joeyh@joeyh.name>
Tue, 24 Aug 2021 16:58:14 +0000 (12:58 -0400)
committerJoey Hess <joeyh@joeyh.name>
Tue, 24 Aug 2021 16:58:14 +0000 (12:58 -0400)
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
CHANGELOG
Command/Unused.hs

index c8b15d3c463727b4102920800b6cd9dcdcdcf096..b9ad175a2e0dd439b0c2dffe1908b57bb7cb4ced 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -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
 
index d636009573edbba33fc394ee5145bb8dd432cc3e..3019dfa7d750238827f19bbea212c40314e599ab 100644 (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