Skip to content

Commit a68d995

Browse files
committed
refactor(GitURL): Move rev field to GitURL
1 parent e5be8b0 commit a68d995

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libvcs/parse/git.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,9 +254,6 @@ class GitBaseURL(URLProtocol, SkipDefaultFieldsReprMixin):
254254
# Decoration
255255
suffix: Optional[str] = None
256256

257-
# commit-ish (rev): tag, branch, ref
258-
rev: Optional[str] = None
259-
260257
matcher: Optional[str] = None
261258
matchers = MatcherRegistry = MatcherRegistry(
262259
_matchers={m.label: m for m in DEFAULT_MATCHERS}
@@ -345,6 +342,9 @@ def to_url(self) -> str:
345342
class GitURL(GitBaseURL, URLProtocol, SkipDefaultFieldsReprMixin):
346343
"""Batteries included URL Parser. Supports git(1) and pip URLs."""
347344

345+
# commit-ish (rev): tag, branch, ref
346+
rev: Optional[str] = None
347+
348348
matchers = MatcherRegistry = MatcherRegistry(
349349
_matchers={m.label: m for m in [*DEFAULT_MATCHERS, *PIP_DEFAULT_MATCHERS]}
350350
)

0 commit comments

Comments
 (0)