This is an automated email from the ASF dual-hosted git repository.

tison pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-site.git

commit 1d7b46016cd47685f09fbfac7e78c6ad2218b62c
Author: tison <wander4...@gmail.com>
AuthorDate: Wed Jan 11 18:55:52 2023 +0800

    fix: allow 1 as return code for git diff-index
    
    Signed-off-by: tison <wander4...@gmail.com>
---
 tools/pytools/lib/execute/site_uploader.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/pytools/lib/execute/site_uploader.py 
b/tools/pytools/lib/execute/site_uploader.py
index 2e747195e30..904ae9ec611 100755
--- a/tools/pytools/lib/execute/site_uploader.py
+++ b/tools/pytools/lib/execute/site_uploader.py
@@ -47,7 +47,7 @@ def _do_push(msg: str, site: Path, branch: str):
     git = find_command('git', msg="git is required")
 
     run(git, 'add', '-A', '.', cwd=site)
-    changed = run(git, 'diff-index', '--quiet', 'HEAD').returncode
+    changed = run(git, 'diff-index', '--quiet', 'HEAD', codes={0, 
1}).returncode
     print(f'changed: {changed}')
 
     run(git, 'status', cwd=site)

Reply via email to