Skip to content

Commit

Permalink
Make second capture lazy
Browse files Browse the repository at this point in the history
This prevents it from sucking up the optional .git
  • Loading branch information
mikepurvis authored Nov 24, 2024
1 parent 7e153df commit 3298f5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rosdistro/repository_specification.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

class RepositorySpecification(object):
# Match groups are server and path on server.
VCS_REGEX = re.compile(r'(?:https?:\/\/|ssh:\/\/|git:\/\/|git@)((?:[a-fA-F0-9]{40}@)?[\w.-]+)[:/]([\w./-]*)(?:\.git)?$')
VCS_REGEX = re.compile(r'(?:https?:\/\/|ssh:\/\/|git:\/\/|git@)((?:[a-fA-F0-9]{40}@)?[\w.-]+)[:/]([\w./-]*?)(?:\.git)?$')

def __init__(self, name, data):
self.name = name
Expand Down

0 comments on commit 3298f5e

Please sign in to comment.