From: Ingo Molnar <mingo@kernel.org>
To: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Namhyung Kim <namhyung@gmail.com>,
Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Subject: Re: [PATCH] perf tool: simplify a git command in PERF-VERSION-GEN
Date: Wed, 2 Oct 2013 11:42:20 +0200 [thread overview]
Message-ID: <20131002094220.GA9358@gmail.com> (raw)
In-Reply-To: <1380702502-9171-1-git-send-email-artagnon@gmail.com>
* Ramkumar Ramachandra <artagnon@gmail.com> wrote:
> Replace a complex git log invocation with a simpler git rev-parse
> invocation.
>
> Cc: Ingo Molnar <mingo@kernel.org>
> Cc: Namhyung Kim <namhyung@gmail.com>
> Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.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@kernel.org>
Thanks,
Ingo
prev parent reply other threads:[~2013-10-02 9:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-02 8:28 [PATCH] perf tool: simplify a git command in PERF-VERSION-GEN Ramkumar Ramachandra
2013-10-02 9:42 ` Ingo Molnar [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131002094220.GA9358@gmail.com \
--to=mingo@kernel.org \
--cc=acme@ghostprotocols.net \
--cc=artagnon@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=namhyung@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.