[Buildroot] custom git repos stopped working
stsp <[email protected]>
| Newsgroups | net.busybox.buildroot |
|---|---|
| Message-ID | <[email protected]> |
Hi, I've updated buildroot, and found
that my custom git repos no longer work:
```
$ ./make.sh comcom64-source
...
GIT_DIR=/home/stas/src/fdpp-buildroot/buildroot/dl/comcom64/git/.git git
fetch origin
remote: Enumerating objects: 3454, done.
...
GIT_DIR=/home/stas/src/fdpp-buildroot/buildroot/dl/comcom64/git/.git git
fetch origin -t -f
Could not fetch special ref 'master'; assuming it is not special.
Commit 'master' does not exist in this repository.
```
So this creates an empty repo:
$ git branch -r
origin/HEAD -> origin/master
origin/gh-pages
origin/master
$ git branch
$
Remote branches are there, including master.
But no local branches.
Then I did this patch to buildroot:
```
--- a/support/download/git
+++ b/support/download/git
@@ -143,7 +143,7 @@ _git fetch "${@}" origin -t -f
# below, if there is an issue anyway. Since most of the cset we're gonna
# have to clone are not such special refs, consign the output to oblivion
# so as not to alarm unsuspecting users, but still trace it as a warning.
-if ! _git fetch "${@}" origin "'${cset}:${cset}'" >/dev/null 2>&1; then
+if ! _git fetch -u "${@}" origin "'${cset}:${cset}'" >/dev/null 2>&1; then
printf "Could not fetch special ref '%s'; assuming it is not
special.\n" "${cset}"
fi
```
And this time it worked as expected.
(patch adds -u after fetch)
This doesn't make sense to me, as -u is documented as:
By default git fetch refuses to update the head which
corresponds to
the current branch. This flag disables the check.
But there is no current branch, there is no
any branch at all! So maybe something changed
in git?
$ git --version
git version 2.53.0
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot