diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-05-14 13:11:18 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-05-14 13:11:18 -0400 |
commit | 5445c78ce13fab97df3d34fdbd40fd80855aa3d9 (patch) | |
tree | 1e2b05383ee079867e60a3c123fdd84e60175264 /doc | |
parent | ce8b2d307fc2a4f024bb5a319757ecfbc3c46207 (diff) |
more formal spec
Diffstat (limited to 'doc')
-rw-r--r-- | doc/todo/unused_by_refspec.mdwn | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/doc/todo/unused_by_refspec.mdwn b/doc/todo/unused_by_refspec.mdwn index 20b9177da..781425264 100644 --- a/doc/todo/unused_by_refspec.mdwn +++ b/doc/todo/unused_by_refspec.mdwn @@ -17,11 +17,20 @@ 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 + +refs/heads/*:+HEAD^:+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 '-' +This is processed by starting with an empty set of refs, and walking the +refspec in order. -Also, allow use of HEAD, and anything else that `git show-ref` can handle. +* Each + is matched against all known refs (from `git show-ref`), and adds + everything it matches to the set. If the + does not contain a wildcard, + it is literally added to the set, rather than looking in the known refs. + This allows "+refs/heads/*" to match all heads, and "+HEAD" + to match HEAD, or even "+sha" to match a given SHA, or "+HEAD^" to match + the previous head. +* Each - is matched against the contents of the set, and removes everything + it matches, using a lexographic matching with wildcards (not looking at + the SHAs that the refs point to, so -refs/heads/master does not remove + +HEAD). --[[Joey]] |