Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] autobuild-run: fix retrieving the gitid
@ 2017-08-12  9:49 Yann E. MORIN
  2017-08-12 15:43 ` Arnout Vandecappelle
  2017-08-13 21:54 ` Thomas Petazzoni
  0 siblings, 2 replies; 3+ messages in thread
From: Yann E. MORIN @ 2017-08-12  9:49 UTC (permalink / raw)
  To: buildroot

Before 66f91eb (autobuild-run: add --repo option), we used to 'git pull'
to update the local Buildroot clone. This had the side-effect of
updating the local refs because we were pulling from 'origin'.

So 'origin/master' and 'master' were correctly updated.

But since the offending commit, we no longer pull, and we instead fetch
from an explicit repository, which never updates 'origin/master' nor
'master'. Instead, they both are stuck at the time the repository was
cloned, or at the time the autobuild script was updated.

We fix that by just dropping the 'master' ref from the git log so that
the log applies to the commit for current working copy.

Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reported-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Bernd Kuhls <bernd.kuhls@t-online.de>
Cc: Arnout Vandecappelle <arnout@mind.be>
---
 scripts/autobuild-run | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/autobuild-run b/scripts/autobuild-run
index ef4f40e..406b8e5 100755
--- a/scripts/autobuild-run
+++ b/scripts/autobuild-run
@@ -409,7 +409,7 @@ def send_results(result, **kwargs):
         shutil.copyfile(os.path.join(outputdir, "legal-info", "manifest.csv"),
                         os.path.join(resultdir, "licenses-manifest.csv"))
 
-    subprocess.call(["git log master -n 1 --pretty=format:%%H > %s" % \
+    subprocess.call(["git log -n 1 --pretty=format:%%H > %s" % \
                      os.path.join(resultdir, "gitid")],
                     shell=True, cwd=srcdir)
 
-- 
2.11.0

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

end of thread, other threads:[~2017-08-13 21:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-12  9:49 [Buildroot] [PATCH] autobuild-run: fix retrieving the gitid Yann E. MORIN
2017-08-12 15:43 ` Arnout Vandecappelle
2017-08-13 21:54 ` Thomas Petazzoni

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