Skip to content

Commit

Permalink
Merge pull request #29 from robertopradoc/v2.31.2
Browse files Browse the repository at this point in the history
fix: port fix to v2.31
  • Loading branch information
bastien31 authored Sep 13, 2023
2 parents 437d787 + e91f15d commit 8d22502
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
19 changes: 11 additions & 8 deletions repo/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -3946,14 +3946,17 @@ def _ConfigureDepth(self, depth):
"""
# Opt.depth will be non-None if user actually passed --depth to repo init.
if depth is not None:
if depth > 0:
# Positive values will set the depth.
depth = str(depth)
else:
# Negative numbers will clear the depth; passing None to SetString
# will do that.
depth = None

try:
if int(depth) > 0:
# Positive values will set the depth.
depth = str(depth)
else:
# Negative numbers will clear the depth; passing None to SetString
# will do that.
depth = None
except ValueError:
depth = None
_warn("depth: invalid integer value: '%s'", depth)
# We store the depth in the main manifest project.
self.config.SetString('repo.depth', depth)

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

setup(
name="gitrepo",
version="2.31.1",
version="2.31.2",
packages=find_packages(),

package_data={
Expand Down

0 comments on commit 8d22502

Please sign in to comment.