diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-05-13 11:30:41 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-05-13 11:30:41 -0400 |
commit | bbf07e2b79a96baf89fc80b9afbd086c0a3f2862 (patch) | |
tree | 009b40ebe6e9cea716d3e976e95ede621bb2a6b0 | |
parent | 04f0aab1c7a5ea777e86c9c1d6a93fc17d03635b (diff) |
design
-rw-r--r-- | doc/todo/unused_by_refspec.mdwn | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/doc/todo/unused_by_refspec.mdwn b/doc/todo/unused_by_refspec.mdwn new file mode 100644 index 000000000..20b9177da --- /dev/null +++ b/doc/todo/unused_by_refspec.mdwn @@ -0,0 +1,27 @@ +Currently `git annex unused` assumes that all branches (including remote +tracking branches) and tags are "used" and finds only objects not used by +any of those refs. + +That's a reasonable default, but in some cases, we don't care about +specific refs. Perhaps we don't consider remote tracking branches +important. Or perhaps we only want objects in HEAD to be considered used. + +This could be handled by adding an option to specify a refspec when running +git-annex unused. Only matching refs would be checked. It's probably worth +making this be both a command-line option --used-refspec, as well as a +annex.used-refspec config setting. + +git's refspec format is not quite right (since it specifies a local side +and a remote side for push/pull). But, it can be used as a point of +departure. Let's allow wildcards as it does, and use leading '+' to add a +ref, and '-' to remove. Let the user specify multiple such expressions, +separated by ':'. + + +refs/heads/*:-refs/remotes/*:+refs/tags/*:-refs/tags/old-tag + +Note that this needs to be processed by taking all refs matching any '+', +and then removing any of those that match any '-' + +Also, allow use of HEAD, and anything else that `git show-ref` can handle. + +--[[Joey]] |