From a6b647af79c1d8ed9b58a08d494aa169d1500d41 Mon Sep 17 00:00:00 2001 From: Paulo Neves Date: Tue, 20 Sep 2022 13:45:53 +0200 Subject: bitbake: fetch2: Remove unneeded conditional The condition will always evaluate to true and thus is redundant. (Bitbake rev: be1ee681e8a566564549068dcf90c95c36544815) Signed-off-by: Paulo Neves Signed-off-by: Richard Purdie --- bitbake/lib/bb/fetch2/git.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'bitbake/lib/bb/fetch2/git.py') diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py index 4534bd7580..17d4904927 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py @@ -567,13 +567,12 @@ class Git(FetchMethod): source_found = False source_error = [] - if not source_found: - clonedir_is_up_to_date = not self.clonedir_need_update(ud, d) - if clonedir_is_up_to_date: - runfetchcmd("%s clone %s %s/ %s" % (ud.basecmd, ud.cloneflags, ud.clonedir, destdir), d) - source_found = True - else: - source_error.append("clone directory not available or not up to date: " + ud.clonedir) + clonedir_is_up_to_date = not self.clonedir_need_update(ud, d) + if clonedir_is_up_to_date: + runfetchcmd("%s clone %s %s/ %s" % (ud.basecmd, ud.cloneflags, ud.clonedir, destdir), d) + source_found = True + else: + source_error.append("clone directory not available or not up to date: " + ud.clonedir) if not source_found: if ud.shallow: -- cgit v1.2.3-54-g00ecf