followup
This commit is contained in:
parent
ac06c34d05
commit
95f7295b67
2 changed files with 24 additions and 0 deletions
2
Limit.hs
2
Limit.hs
|
@ -163,6 +163,8 @@ addCopies = addLimit . limitCopies
|
|||
|
||||
limitCopies :: MkLimit Annex
|
||||
limitCopies want = case splitc ':' want of
|
||||
-- Note that in case of a group having the same name as a trust
|
||||
-- level, it's parsed as a trust level, not as a group.
|
||||
[v, n] -> case parsetrustspec v of
|
||||
Just checker -> go n $ checktrust checker
|
||||
Nothing -> go n $ checkgroup v
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
[[!comment format=mdwn
|
||||
username="joey"
|
||||
subject="""comment 1"""
|
||||
date="2018-06-04T16:06:57Z"
|
||||
content="""
|
||||
Thanks for pointing out this ambiguity, which I don't remember having
|
||||
ever considered.
|
||||
|
||||
The code for this does look for the name of a trust level first,
|
||||
and only a group name if it's not a trust level. So, adding a group
|
||||
with a colliding name will never change the behavior of such a command
|
||||
or preferred content expression.
|
||||
|
||||
The only problem then would be that you couldn't match
|
||||
on a group by that name. But if you run into that problem,
|
||||
you can simply rename your group.
|
||||
|
||||
So I don't think that git-annex needs a sanity check, really.
|
||||
|
||||
(I have added a comment in the code to make clear that the order of
|
||||
parsing this does matter.)
|
||||
"""]]
|
Loading…
Reference in a new issue