lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20131002094220.GA9358@gmail.com>
Date:	Wed, 2 Oct 2013 11:42:20 +0200
From:	Ingo Molnar <mingo@...nel.org>
To:	Ramkumar Ramachandra <artagnon@...il.com>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Namhyung Kim <namhyung@...il.com>,
	Arnaldo Carvalho de Melo <acme@...stprotocols.net>
Subject: Re: [PATCH] perf tool: simplify a git command in PERF-VERSION-GEN


* Ramkumar Ramachandra <artagnon@...il.com> wrote:

> Replace a complex git log invocation with a simpler git rev-parse
> invocation.
> 
> Cc: Ingo Molnar <mingo@...nel.org>
> Cc: Namhyung Kim <namhyung@...il.com>
> Cc: Arnaldo Carvalho de Melo <acme@...stprotocols.net>
> Signed-off-by: Ramkumar Ramachandra <artagnon@...il.com>
> ---
>  tools/perf/util/PERF-VERSION-GEN | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/perf/util/PERF-VERSION-GEN b/tools/perf/util/PERF-VERSION-GEN
> index 15a77b7..b23d11b 100755
> --- a/tools/perf/util/PERF-VERSION-GEN
> +++ b/tools/perf/util/PERF-VERSION-GEN
> @@ -18,7 +18,7 @@ TAG=
>  if test -d ../../.git -o -f ../../.git
>  then
>  	TAG=$(git describe --abbrev=0 --match "v[0-9].[0-9]*" 2>/dev/null )
> -	CID=$(git log -1 --abbrev=4 --pretty=format:"%h" 2>/dev/null) && CID="-g$CID"
> +	CID=$(git rev-parse --short HEAD 2>/dev/null) && CID="-g$CID"

This shaves 4 milliseconds off the build time as well.

Acked-by: Ingo Molnar <mingo@...nel.org>

Thanks,

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ