We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0099900 commit 6bb9391Copy full SHA for 6bb9391
1 file changed
src/libvcs/cmd/git.py
@@ -1648,3 +1648,31 @@ def config(
1648
["config", *local_flags],
1649
check_returncode=False,
1650
)
1651
+
1652
+ def version(
1653
+ self,
1654
+ *,
1655
+ build_options: Optional[bool] = None,
1656
+ **kwargs: Any,
1657
+ ) -> str:
1658
+ """Version. Wraps `git version <https://git-scm.com/docs/git-version>`_.
1659
1660
+ Examples
1661
+ --------
1662
+ >>> git = Git(dir=git_local_clone.dir)
1663
1664
+ >>> git.version()
1665
+ 'git version ...'
1666
1667
+ >>> git.version(build_options=True)
1668
1669
+ """
1670
+ local_flags: list[str] = []
1671
1672
+ if build_options is True:
1673
+ local_flags.append("--build-options")
1674
1675
+ return self.run(
1676
+ ["version", *local_flags],
1677
+ check_returncode=False,
1678
+ )
0 commit comments