support/download/git: Fix compatibility issue with git older than 1.8.4
authorEnrique Ocaña González <eocanha@igalia.com>
Thu, 28 Jul 2016 08:40:22 +0000 (10:40 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Thu, 28 Jul 2016 20:02:13 +0000 (22:02 +0200)
The "--no-patch" option used by the git downloader appeared on git
1.8.4. Systems with older git versions show an error and fall back to
the wget downloader, which isn't suitable for all the cases.

Signed-off-by: Enrique Ocaña González <eocanha@igalia.com>
Tested-by: Matthew Weber <matthew.weber@rockwellcollins.com>
Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
support/download/git

index 663006b4d0e9858031c80f2875c1e9caa5c363e6..416cd1baf2a6082791532fc4d9887563cf9faa1c 100755 (executable)
@@ -76,7 +76,7 @@ _git checkout -q "'${cset}'"
 
 # Get date of commit to generate a reproducible archive.
 # %cD is RFC2822, so it's fully qualified, with TZ and all.
-date="$( _git show --no-patch --pretty=format:%cD )"
+date="$( _git log -1 --pretty=format:%cD )"
 
 # There might be submodules, so fetch them.
 if [ ${recurse} -eq 1 ]; then