RTEMS Source Builder | sb-get-sources downloads git repos with --no-download specified (#143)

Chris Johns (@chris) gitlab at rtems.org
Tue Nov 11 23:49:13 UTC 2025




Chris Johns commented on a discussion: https://gitlab.rtems.org/rtems/tools/rtems-source-builder/-/issues/143#note_135924


Does this patch fix the issue:

```diff
diff --git a/source-builder/sb/download.py b/source-builder/sb/download.py
index bb54f99..a5d2edd 100644
--- a/source-builder/sb/download.py
+++ b/source-builder/sb/download.py
@@ -504,10 +504,11 @@ def _git_downloader(url, local, config, opts):
         if enabled(opts):
             repo.clone(us[0], local)
     else:
-        repo.clean(['-f', '-d'])
-        repo.reset('--hard')
-        default_branch = repo.default_branch()
-        repo.checkout(default_branch)
+        if enabled(opts):
+            repo.clean(['-f', '-d'])
+            repo.reset('--hard')
+            default_branch = repo.default_branch()
+            repo.checkout(default_branch)
     for a in us[1:]:
         _as = a.split('=')
         if _as[0] == 'branch' or _as[0] == 'checkout':
```

?

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/tools/rtems-source-builder/-/issues/143#note_135924
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20251111/3154fd17/attachment.htm>


More information about the bugs mailing list