Skip to content
Snippets Groups Projects
Commit 506e8eeacf44 authored by Georges Racinet's avatar Georges Racinet
Browse files

gitlab hooks: stop returning None for no changes

This is more robust.

It was originally intended as a way for callers to check
the condition, but it makes something to check systematically
(exception in string concatenation downstream if forgotten)
and it's better if callers check before hand (worst case they
will emit empty lines in the likes of `ui.status` if forgotten)
parent 0767b77f2e13
No related branches found
No related tags found
1 merge request!15Rewrapping of hg-git, writing directly in GitLab's Git repository
Pipeline #
......@@ -76,7 +76,7 @@
if not changes:
self.repo.ui.debug(
"%s: empty set of changes - nothing to do." % self)
return 0, None, None
return 0, '', ''
try:
env = self.environ()
......
......@@ -53,7 +53,7 @@
assert 'GL_ID' not in repo.ui.environ
# calling with empty changes
assert hook(()) == (0, None, None)
assert hook(()) == (0, '', '')
# now with an executable
# we need a pseudo Git repo
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment