aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2022-08-15 12:50:18 -0400
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2022-08-15 12:50:18 -0400
commit44431bc042de69ddc51a3d6e4e37acb249cf29cf (patch)
tree965f2f6020cae937c909f71400c261644fe7e1e7
parenta76f5c19f80da7dd9416c6e29da7835d53b2d893 (diff)
downloadb4-44431bc042de69ddc51a3d6e4e37acb249cf29cf.tar.gz
ez: do not bail on untracked files for prep tasks
We're not going to care about untracked files for most of b4 prep operations, so don't error out when they are present and we're running "is the tree clean" checks. Suggested-by: Maxime Ripard <maxime@cerno.tech> Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rw-r--r--b4/__init__.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/b4/__init__.py b/b4/__init__.py
index 3b8b9f3..fd70858 100644
--- a/b4/__init__.py
+++ b/b4/__init__.py
@@ -1967,8 +1967,10 @@ def git_get_command_lines(gitdir: Optional[str], args: list) -> List[str]:
return lines
-def git_get_repo_status(gitdir: Optional[str] = None) -> List[str]:
+def git_get_repo_status(gitdir: Optional[str] = None, untracked: bool = False) -> List[str]:
args = ['status', '--porcelain=v1']
+ if not untracked:
+ args.append('--untracked-files=no')
return git_get_command_lines(gitdir, args)