]> Pileus Git - ~andy/linux/commit
Fix detectition of kernel git repository in setlocalversion script [take #2]
authorFranck Bui-Huu <fbuihuu@gmail.com>
Mon, 2 Dec 2013 15:34:29 +0000 (16:34 +0100)
committerMichal Marek <mmarek@suse.cz>
Fri, 3 Jan 2014 13:48:42 +0000 (14:48 +0100)
commit7593e0902bc41392315316f1b5f4ba15feead842
tree0fefea72a6f43ffd59af98e89b96a51a04ad9bbe
parent6ce4eac1f600b34f2f7f58f9cd8f0503d79e42ae
Fix detectition of kernel git repository in setlocalversion script [take #2]

setlocalversion script was testing the presence of .git directory in
order to find out if git is used as SCM to track the current kernel
project. However in some cases, .git is not a directory but can be a
file: when the kernel is a git submodule part of a git super project for
example.

This patch just fixes this by using 'git rev-parse --show-cdup' to check
that the current directory is the kernel git topdir. This has the
advantage to not test and rely on git internal infrastructure directly.

Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
scripts/setlocalversion