* [Buildroot] [PATCH] support/scripts/pkg-stats: simplify Git commit id retrieval
@ 2019-09-12 16:55 Thomas Petazzoni
2019-09-15 14:10 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Petazzoni @ 2019-09-12 16:55 UTC (permalink / raw)
To: buildroot
As suggested by Baruch Siach, using "git rev-parse HEAD" is a lot
simpler than playing around with "git log" to just retrieve the commit
id corresponding to the current HEAD.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
support/scripts/pkg-stats | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/support/scripts/pkg-stats b/support/scripts/pkg-stats
index 6cb3a6a038..e477828f7b 100755
--- a/support/scripts/pkg-stats
+++ b/support/scripts/pkg-stats
@@ -727,8 +727,8 @@ def __main__():
else:
package_list = None
date = datetime.datetime.utcnow()
- commit = subprocess.check_output(['git', 'log', 'HEAD', '-n', '1',
- '--pretty=format:%H']).splitlines()[0]
+ commit = subprocess.check_output(['git', 'rev-parse',
+ 'HEAD']).splitlines()[0]
print("Build package list ...")
packages = get_pkglist(args.npackages, package_list)
print("Getting package make info ...")
--
2.21.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH] support/scripts/pkg-stats: simplify Git commit id retrieval
2019-09-12 16:55 [Buildroot] [PATCH] support/scripts/pkg-stats: simplify Git commit id retrieval Thomas Petazzoni
@ 2019-09-15 14:10 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2019-09-15 14:10 UTC (permalink / raw)
To: buildroot
On Thu, 12 Sep 2019 18:55:22 +0200
Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:
> As suggested by Baruch Siach, using "git rev-parse HEAD" is a lot
> simpler than playing around with "git log" to just retrieve the commit
> id corresponding to the current HEAD.
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> ---
> support/scripts/pkg-stats | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-09-15 14:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-12 16:55 [Buildroot] [PATCH] support/scripts/pkg-stats: simplify Git commit id retrieval Thomas Petazzoni
2019-09-15 14:10 ` Thomas Petazzoni
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.