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.


_______________________________________________
bugs mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/bugs

Reply via email to