1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
Description: None is not the empty string
Origin: upstream e830f17a + c719bf09
Author: Dominik Wombacher
Forwarded: not-needed
--- a/pagure/lib/git.py
+++ b/pagure/lib/git.py
@@ -90,7 +90,7 @@ def commit_to_patch(
# First commit in the repo
diff = commit.tree.diff_to_tree(swap=True)
- if diff.patch is None:
+ if diff.patch is None or diff.patch == "":
continue
if find_similar and diff:
@@ -2465,7 +2465,7 @@ def get_git_tags(project, with_commits=F
return tags
-def new_git_tag(project, tagname, target, user, message=None, force=False):
+def new_git_tag(project, tagname, target, user, message=str(), force=False):
"""Create a new git tag in the git repository of the specified project.
:arg project: the project in which we want to create a git tag
@@ -2497,7 +2497,7 @@ def new_git_tag(project, tagname, target
target,
target_obj.type,
pygit2.Signature(user.fullname, user.default_email),
- message,
+ message if message else str(),
)
return tag
|