]> git.ipfire.org Git - thirdparty/u-boot.git/commit
patman: Deal with git safe-directory warning
authorSimon Glass <sjg@chromium.org>
Sat, 10 May 2025 11:04:55 +0000 (13:04 +0200)
committerSimon Glass <sjg@chromium.org>
Tue, 27 May 2025 09:07:42 +0000 (10:07 +0100)
commit212ed6bdb73d7999c8a25ad0c55a5358c0b44f03
tree74b6fc80496b1d2c12ec3316623ba83891c91ce7
parent45f239afa1f85fdc6700d8e088e179024c6c21b0
patman: Deal with git safe-directory warning

When running tests where the .git directory is not owned by the current
user, various warnings are produced and the tests fail. This happens in
CI.

For patman itself, modify the gitutil.get_top_level() function to return
None in this case. Ensure that the warning is not shown, since it creates
about 1000 lines of output.

For checkpatch, the same warning is produced even though --no-tree is
given. Suppress that as well.

Signed-off-by: Simon Glass <sjg@chromium.org>
tools/patman/checkpatch.py
tools/patman/cmdline.py
tools/patman/get_maintainer.py
tools/patman/project.py
tools/patman/settings.py
tools/u_boot_pylib/gitutil.py