more formal spec
This commit is contained in:
parent
b04e589ff3
commit
5fea6dcab2
1 changed files with 13 additions and 4 deletions
|
@ -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,
|
ref, and '-' to remove. Let the user specify multiple such expressions,
|
||||||
separated by ':'.
|
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 '+',
|
This is processed by starting with an empty set of refs, and walking the
|
||||||
and then removing any of those that match any '-'
|
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]]
|
--[[Joey]]
|
||||||
|
|
Loading…
Reference in a new issue