From nobody Sat Nov 23 21:14:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1730382448; cv=none; d=zohomail.com; s=zohoarc; b=HqjrO+J6Ky4ax1mnXXbTYZ8Ze7thkpeOO3l5+wrOsu5BvJ1R+dvrr34hgvLelDR+k98oyNdUtz9qBZYy4/9ggft4SOVE82Y2CS+6hCB1rHY6h1LiyVCmcRAIQsDhY9/FXJDaHEVOJm+V3PkEymUQUtNZJpp9Rwex9nxDOzTfF40= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730382448; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=8Z6OYI4AxlFsbpsPGyN28CVgDDbQygAFzxphBread0w=; b=Ph1ZglWKyFSGnF5x6iIIQx86/nGwLtlFKzP+mshSG2OfGAxQ/QDPpRvKsszjzMIsb72BH/Hn6Ugns2YoLi+10bTwTcg0GtXCfq8EWkYWKH/btEMv+EOohJzo22E88xxSpu8/urL7E+D7ZeKjrylykBwtPNdVn8tNROlro0jQPvk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1730382448256420.87520076843737; Thu, 31 Oct 2024 06:47:28 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.828705.1243688 (Exim 4.92) (envelope-from ) id 1t6VW4-0004vh-1y; Thu, 31 Oct 2024 13:47:12 +0000 Received: by outflank-mailman (output) from mailman id 828705.1243688; Thu, 31 Oct 2024 13:47:12 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t6VW3-0004va-VY; Thu, 31 Oct 2024 13:47:11 +0000 Received: by outflank-mailman (input) for mailman id 828705; Thu, 31 Oct 2024 13:47:11 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t6VW3-0004vS-5c for xen-devel@lists.xenproject.org; Thu, 31 Oct 2024 13:47:11 +0000 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [2a00:1450:4864:20::629]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 9d875907-978e-11ef-99a3-01e77a169b0f; Thu, 31 Oct 2024 14:47:05 +0100 (CET) Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-a99ea294480so65737966b.2 for ; Thu, 31 Oct 2024 06:47:05 -0700 (PDT) Received: from andrewcoop.eng.citrite.net ([185.25.67.249]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5ceac770226sm596716a12.37.2024.10.31.06.47.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Oct 2024 06:47:04 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 9d875907-978e-11ef-99a3-01e77a169b0f X-Custom-Connection: eyJyZW1vdGVpcCI6IjJhMDA6MTQ1MDo0ODY0OjIwOjo2MjkiLCJoZWxvIjoibWFpbC1lajEteDYyOS5nb29nbGUuY29tIn0= X-Custom-Transaction: eyJpZCI6IjlkODc1OTA3LTk3OGUtMTFlZi05OWEzLTAxZTc3YTE2OWIwZiIsInRzIjoxNzMwMzgyNDI1Ljc0MTgxNiwic2VuZGVyIjoiYW5kcmV3LmNvb3BlckBjbG91ZC5jb20iLCJyZWNpcGllbnQiOiJ4ZW4tZGV2ZWxAbGlzdHMueGVucHJvamVjdC5vcmcifQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1730382425; x=1730987225; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=8Z6OYI4AxlFsbpsPGyN28CVgDDbQygAFzxphBread0w=; b=Fr0UHWMIbQG8AYVg2OZRKK//ubMleONbpeQXuDB0tek6forV8xpjmEpOhCL9mbkuwh kqOPDw45zEzTykM4RQJOi4cnsMB7Nmer9DWho0zyG4tIgvNbNVlotSsd8UJBe2GdvQeR F/eeQFC+q1eQXeRXg/PMpuqTem764bRT1dB9I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730382425; x=1730987225; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=8Z6OYI4AxlFsbpsPGyN28CVgDDbQygAFzxphBread0w=; b=bp4ngqObrYiOo5655tKVrek8tgLin2dYWqZQkQr+ctyOCgQ7Z/occGurHozmDwiFEi uA0TEqmVKA4V5kZdDRbnbmzl+3nHwkwXnmdLWsU7XcAZBW7d/odGV24zLE/vUhx5BfR6 62idpYb38Qwfhkd4l4EgYeBe1b2vqlq1K+tVP2+vS278BrUWBJFWBRtbW3qIfiYmkEry zib0dBv/COr7kW3PZ6hkACynlC356uAmkh5TbKA+tPtouVNeUamQjIu3RbPWTYCZGipl YyLNIaGf6PZDtHrzdt5L2ZI5+XSgtkInaV4l+uAEDaD3JYOLmvJSfbjXYJAvMEkQbtnF jZqQ== X-Gm-Message-State: AOJu0YwTYDfRFngufaBkcn7nHdbZhpUEm7CR9KZnRXDRG6pUsWEK2vVq UNkxmflGEU8xUGfuBINzFlfGUkLRdLVK6gTG186iax3BSfcZx3lbAQGbPrAnr6AhV8zm0O4eomA o X-Google-Smtp-Source: AGHT+IE+LigPaB/SE/U+rD9aS8XeCHqhS72C9rcVyIEq1BY+tD4cdgHwmQEHJmDSWLTWApo7tndlCA== X-Received: by 2002:a05:6402:40cb:b0:5ce:afba:f48a with SMTP id 4fb4d7f45d1cf-5ceafbb03b7mr1998093a12.27.1730382424681; Thu, 31 Oct 2024 06:47:04 -0700 (PDT) From: Andrew Cooper To: Xen-devel Cc: Andrew Cooper , Jan Beulich , Stefano Stabellini , Julien Grall Subject: [PATCH] scripts: Refine git-checkout.sh change for different branches Date: Thu, 31 Oct 2024 13:47:02 +0000 Message-Id: <20241031134702.2913536-1-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1730382449083116600 Content-Type: text/plain; charset="utf-8" The change works for divergent branches, but doesn't work for explicit SHAs. Instead of passing `-b $TAG` to clone, explicitly fetch the $TAG we want af= ter cloning. Fixes: c554ec124b12 ("scripts: Fix git-checkout.sh to work with branches ot= her than master") Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Stefano Stabellini CC: Julien Grall Speculative fix, pending CI: https://gitlab.com/xen-project/people/andyhhp/xen/-/pipelines/1521847529 --- scripts/git-checkout.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/git-checkout.sh b/scripts/git-checkout.sh index 3796cbfe39a7..9f8f2bd04fca 100755 --- a/scripts/git-checkout.sh +++ b/scripts/git-checkout.sh @@ -14,9 +14,10 @@ set -e if test \! -d $DIR-remote; then rm -rf $DIR-remote $DIR-remote.tmp mkdir -p $DIR-remote.tmp; rmdir $DIR-remote.tmp - $GIT clone -b $TAG $TREE $DIR-remote.tmp + $GIT clone $TREE $DIR-remote.tmp if test "$TAG" ; then cd $DIR-remote.tmp + $GIT fetch origin $TAG $GIT branch -D dummy >/dev/null 2>&1 ||: $GIT checkout -b dummy $TAG cd - base-commit: 9a2a50d5de7647bfb529867fdce47ec64b07f06a prerequisite-patch-id: ef7a8f78a2a3bfb35a2835ce8c2ec97d95f1267e prerequisite-patch-id: 8c25962203bdb283a9c95328fb0867ffa3da8b95 --=20 2.39.5