Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 56e43a6

Browse files
committed
docs(MIGRATION) Note version() returning Version
1 parent 563f5d9 commit 56e43a6

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

MIGRATION

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,27 @@ _Notes on the upcoming release will be added here_
2424

2525
<!-- Maintainers, insert migration notes for the next release here -->
2626

27+
#### Git version handling API changes (#491)
28+
29+
- `Git.version()` now returns a `Version` object instead of a string
30+
31+
Before:
32+
33+
```python
34+
git = Git(path=path)
35+
version_str = git.version() # returns a string like "2.43.0"
36+
```
37+
38+
After:
39+
40+
```python
41+
git = Git(path=path)
42+
version_obj = git.version() # returns a Version object
43+
version_str = ".".join([str(x) for x in (version_obj.major, version_obj.minor, version_obj.micro)])
44+
```
45+
46+
- `GitSync.get_git_version()` continues to return a string for backward compatibility
47+
2748
#### pytest fixtures: `git_local_clone` renamed to `example_git_repo` (#468)
2849

2950
- pytest: `git_local_clone` renamed to `example_git_repo`

0 commit comments

Comments
 (0)