comment, todo
This commit is contained in:
parent
80be770041
commit
6115bced71
2 changed files with 41 additions and 0 deletions
|
@ -0,0 +1,14 @@
|
||||||
|
[[!comment format=mdwn
|
||||||
|
username="joey"
|
||||||
|
subject="""Re: Dropping all older versions of a file"""
|
||||||
|
date="2023-08-22T16:23:29Z"
|
||||||
|
content="""
|
||||||
|
@mario interesting question..
|
||||||
|
|
||||||
|
You could use `git log --raw` to list old versions of the file, and
|
||||||
|
then use `git show` to find the git-annex key.
|
||||||
|
|
||||||
|
Doable, but would take quite a lot of bother to script.
|
||||||
|
I think it would be a good enhancement to git-annex to
|
||||||
|
add a [[todo/command_to_list_keys_for_old_versions_of_files]].
|
||||||
|
"""]]
|
27
doc/todo/command_to_list_keys_for_old_versions_of_files.mdwn
Normal file
27
doc/todo/command_to_list_keys_for_old_versions_of_files.mdwn
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
A command like `git-annex oldkeys $file` that lists the keys used for all
|
||||||
|
previous versions of the file.
|
||||||
|
|
||||||
|
It would allow a workflow like eg:
|
||||||
|
|
||||||
|
edit foo
|
||||||
|
git-annex add foo
|
||||||
|
git-annex oldkeys foo | git-annex move --batch-keys --to bar
|
||||||
|
|
||||||
|
Or like this:
|
||||||
|
|
||||||
|
git-annex oldkeys foo | git-annex get --batch-keys
|
||||||
|
# proceed to diff between old versions of the file
|
||||||
|
# (although git-annex-diffdriver --get is another way to do this)
|
||||||
|
|
||||||
|
Or this to make every old version visible as files:
|
||||||
|
|
||||||
|
n=0
|
||||||
|
for k in $(git-annex oldkeys my.gif); do
|
||||||
|
$n=$(expr $n + 1)
|
||||||
|
ln -s $(git-annex examinkey $k --format='${objectpath}') my.$n.gif
|
||||||
|
done
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
Is oldkeys the best name for this? `git-annex log` is already taken.
|
||||||
|
--[[Joey]]
|
Loading…
Add table
Add a link
Reference in a new issue