diff mbox

[1/1] Fix backward incompatibility on git downloader for git older than 1.8.4

Message ID 1469695222-1749-1-git-send-email-eocanha@igalia.com
State Accepted
Commit 1e39f0873393189278d92ac3589a329f42c8311c
Headers show

Commit Message

Enrique Ocaña González July 28, 2016, 8:40 a.m. UTC
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>
---
 support/download/git | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Matt Weber July 28, 2016, 11:54 a.m. UTC | #1
Enrique,

On Jul 28, 2016 3:40 AM, "Enrique Ocaña González" <eocanha@igalia.com>
wrote:
>
> 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>
> ---
>  support/download/git | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/support/download/git b/support/download/git
> index 663006b..416cd1b 100755
> --- a/support/download/git
> +++ b/support/download/git
> @@ -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 )"

Tested-by: Matthew Weber <matthew.weber@rockwellcollins.com>

>
>  # There might be submodules, so fetch them.
>  if [ ${recurse} -eq 1 ]; then
> --
> 1.8.3.2
>
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
Yann E. MORIN July 28, 2016, 7:30 p.m. UTC | #2
Enrique, All,

On 2016-07-28 10:40 +0200, Enrique Ocaña González spake thusly:
> 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: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

> ---
>  support/download/git | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/support/download/git b/support/download/git
> index 663006b..416cd1b 100755
> --- a/support/download/git
> +++ b/support/download/git
> @@ -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
> -- 
> 1.8.3.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
Peter Korsgaard July 28, 2016, 8:03 p.m. UTC | #3
>>>>> "Enrique" == Enrique Ocaña González <eocanha@igalia.com> writes:

 > 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>

Committed after rewording the commit message slightly, thanks.
diff mbox

Patch

diff --git a/support/download/git b/support/download/git
index 663006b..416cd1b 100755
--- a/support/download/git
+++ b/support/download/git
@@ -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