2016-07-19 17:04:56 +00:00
|
|
|
Currently, commands can operate on specific files in the working tree,
|
|
|
|
or on all known keys, or on a specific key. It would be useful to have
|
|
|
|
something like `--branch foo` which would operate on the files present in
|
|
|
|
the specified branch.
|
|
|
|
|
|
|
|
For example, this would be useful in bare repos to fsck only the master
|
|
|
|
branch, and not all versions of all keys.
|
|
|
|
|
|
|
|
It might be worth allowing a full refspec, so that eg `refs/remotes/*/master`
|
2016-07-19 18:07:31 +00:00
|
|
|
or `refs/tags/*` can be operated on. --[[Joey]]
|
|
|
|
|
|
|
|
> This should be pretty easy to implement, using `git ls-tree`
|
|
|
|
> to enumerate the contents of the ref.
|
|
|
|
>
|
|
|
|
> The wrinkle is that for --all, the name of each key is shown as it's
|
|
|
|
> operated on. But in this case, we want to instead display something like
|
|
|
|
> "ref:filename".
|
|
|
|
>
|
|
|
|
> So, every command that supports --branch (which probably
|
|
|
|
> should be all the ones currently supporting --all) will need to be
|
|
|
|
> modified, to be provided some new data type that is not FilePath to a
|
|
|
|
> work tree file, but something to display while operating on an item.
|
|
|
|
>
|
|
|
|
> Not a hard change to make, but an extensive one. --[[Joey]]
|
--branch, stage 1
Added --branch option to copy, drop, fsck, get, metadata, mirror, move, and
whereis commands. This option makes git-annex operate on files that are
included in a specified branch (or other treeish).
The names of the files from the branch that are being operated on are not
displayed yet; only the keys. Displaying the filenames will need changes
to every affected command.
Also, note that --branch can be specified repeatedly. This is not really
documented, but seemed worth supporting, especially since we may later want
the ability to operate on all branches matching a refspec. However, when
operating on two branches that contain the same key, that key will be
operated on twice.
2016-07-20 16:05:22 +00:00
|
|
|
|
|
|
|
>> I've implemented the first part of this, so --branch works
|
|
|
|
>> but the name of the key is shown, rather than the file from the branch.
|
|
|
|
>> --[[Joey]]
|
2016-07-20 19:22:55 +00:00
|
|
|
|
|
|
|
>>> All [[done]] now. --[[Joey]]
|