Git rev-list --max-count needs an = for assignment

* install_modules.sh: When invoking git rev-list with --max-count it
only supports = and not space before the value. The previous
implementation was flawed and only ever resulted in git errors about
an unrecognized ref for which it was misinterpreting the --max-count
value as representing.

Change-Id: I11f8f5b6e13d4640d6558f423292ad7e7b89961f
This commit is contained in:
Jeremy Stanley 2014-07-10 21:32:44 +00:00 committed by Clark Boylan
parent 1d854cf598
commit 3f1491d1e4
1 changed files with 1 additions and 1 deletions

View File

@ -109,7 +109,7 @@ for MOD in ${!SOURCE_MODULES[*]} ; do
# fetch the latest refs from the repo
$GIT_CMD_BASE fetch
# make sure the correct revision is installed, I have to use rev-list b/c rev-parse does not work with tags
if [ `${GIT_CMD_BASE} rev-list HEAD --max-count 1` != `${GIT_CMD_BASE} rev-list ${SOURCE_MODULES[$MOD]} --max-count 1` ]; then
if [ `${GIT_CMD_BASE} rev-list HEAD --max-count=1` != `${GIT_CMD_BASE} rev-list ${SOURCE_MODULES[$MOD]} --max-count=1` ]; then
# checkout correct revision
$GIT_CMD_BASE checkout ${SOURCE_MODULES[$MOD]}
fi