Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] git: fix handling of git repos using master as version
@ 2018-06-04 13:32 Robert Beckett
  2018-06-04 13:32 ` [Buildroot] [PATCH 2/2] dl-wrapper: Fix support for URIs containing '+' Robert Beckett
  2018-06-04 14:33 ` [Buildroot] [PATCH 1/2] git: fix handling of git repos using master as version Thomas Petazzoni
  0 siblings, 2 replies; 20+ messages in thread
From: Robert Beckett @ 2018-06-04 13:32 UTC (permalink / raw)
  To: buildroot

Since changing to git init followed by fetch to initialise
git cache, when using master branch as the target version
for a package, git refuses to fetch in to currently checkout
out branch or master.

git init always creates a master branch, so this will always
be an issue for any package targeting master.
Add -u option to git fetch command to allow it to ignore that
check. We know that it is okay to overwrite master as we know that
it either contains nothing after the initial git init command, or
is tracking the remote master after a successful fetch.
We always want it to overwrite it.

Signed-off-by: Robert Beckett <bbeckett@netvu.org.uk>
---
 support/download/git | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/support/download/git b/support/download/git
index 11bb52c..c33e692 100755
--- a/support/download/git
+++ b/support/download/git
@@ -122,7 +122,7 @@ _git fetch origin -t
 # 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
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2018-06-05 19:36 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-04 13:32 [Buildroot] [PATCH 1/2] git: fix handling of git repos using master as version Robert Beckett
2018-06-04 13:32 ` [Buildroot] [PATCH 2/2] dl-wrapper: Fix support for URIs containing '+' Robert Beckett
2018-06-04 15:56   ` Yann E. MORIN
2018-06-04 20:00   ` Thomas Petazzoni
2018-06-04 14:33 ` [Buildroot] [PATCH 1/2] git: fix handling of git repos using master as version Thomas Petazzoni
2018-06-04 14:59   ` Bob Beckett
2018-06-04 15:44     ` Yann E. MORIN
2018-06-04 16:32       ` Bob Beckett
2018-06-04 16:52         ` Gary Bisson
2018-06-04 16:54           ` Bob Beckett
2018-06-04 17:22             ` Henrique Marks
2018-06-04 22:45             ` Trent Piepho
2018-06-04 22:19           ` Arnout Vandecappelle
2018-06-05  3:26             ` Baruch Siach
2018-06-05 19:36               ` Arnout Vandecappelle
2018-06-05  5:53             ` Thomas Petazzoni
2018-06-04 16:23     ` Thomas Petazzoni
2018-06-04 16:51       ` Bob Beckett
2018-06-04 22:18         ` Arnout Vandecappelle
2018-06-05  7:57           ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox