Skip to content

Commit

Permalink
fix: port fix to v2.31
Browse files Browse the repository at this point in the history
Signed-off-by: Roberto Vladimir Prado Carranza <[email protected]>
  • Loading branch information
Roberto Vladimir Prado Carranza committed Sep 13, 2023
1 parent 437d787 commit e91f15d
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 e91f15d

Please sign in to comment.