From: Michal Marek <mmarek@suse.cz>
To: Franck Bui-Huu <fbuihuu@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Fix detectition of kernel git repository in setlocalversion script
Date: Mon, 02 Dec 2013 15:57:59 +0100 [thread overview]
Message-ID: <529C9FF7.3040005@suse.cz> (raw)
In-Reply-To: <1385990497-11805-1-git-send-email-fbuihuu@gmail.com>
On 2.12.2013 14:21, Franck Bui-Huu wrote:
> diff --git a/scripts/setlocalversion b/scripts/setlocalversion
> index 0b5ccf3..c16e65d 100755
> --- a/scripts/setlocalversion
> +++ b/scripts/setlocalversion
> @@ -43,7 +43,8 @@ scm_version()
> fi
>
> # Check for git and a git repo.
> - if test -d .git && head=`git rev-parse --verify --short HEAD 2>/dev/null`; then
> + if topdir=$(git rev-parse --show-cdup 2>/dev/null) && test -z "$topdir" &&
> + head=`git rev-parse --verify --short HEAD 2>/dev/null`; then
You can do test -z "$(git rev-parse --show-cdup 2>/dev/null)" without
the $topdir variable.
Michal
next prev parent reply other threads:[~2013-12-02 14:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-02 13:21 [PATCH] Fix detectition of kernel git repository in setlocalversion script Franck Bui-Huu
2013-12-02 14:57 ` Michal Marek [this message]
2013-12-02 15:14 ` Franck Bui-Huu
2013-12-02 15:16 ` Michal Marek
2013-12-02 15:23 ` Franck Bui-Huu
2013-12-02 15:34 ` [PATCH] Fix detectition of kernel git repository in setlocalversion script [take #2] Franck Bui-Huu
2014-01-03 13:49 ` Michal Marek
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=529C9FF7.3040005@suse.cz \
--to=mmarek@suse.cz \
--cc=fbuihuu@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/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.