todo from comment

This commit is contained in:
Joey Hess 2021-03-11 12:26:10 -04:00
parent 4fc5dbc942
commit 06f86379b0
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 21 additions and 0 deletions

View file

@ -0,0 +1,8 @@
[[!comment format=mdwn
username="joey"
subject="""comment 12"""
date="2021-03-11T15:59:50Z"
content="""
@meribold there is not, but I've opened a todo,
[[todo/git-annex-unused_--history]]
"""]]

View file

@ -0,0 +1,13 @@
Add to git-annex unused a --history or similar switch, that makes it look at
the full history of all specified refs, and only consider files unused if
they never appeared in a git commit at all.
This would, like `git gc`, find files that were added, but then
deleted/changed before being committed. Which git-annex unused already
does, but it also finds files in past versions. If the user wants to keep
past versions, but gc any dangling objects, this would be useful.
To traverse the whole history and get the list of changes, could use `git
log --raw`. That is reasonably performant but then it needs to feed every
sha into cat-file to find the annex objects, which would probably take a
while. Alternatively perhaps git log --diff and parsing might be faster.