From aad25ddbbed2f27df08ae4fea80dfcf94a859bd6 Mon Sep 17 00:00:00 2001 From: Simran Date: Thu, 11 Aug 2022 10:08:07 +0200 Subject: [PATCH] Add -L option to curl examples The request to https://github.com/jingweno/gh/pull/55.patch is redirected to https://patch-diff.githubusercontent.com/raw/jingweno/gh/pull/55.patch but cURL doesn't follow redirects by default, letting the download fail silently --- commands/apply.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/apply.go b/commands/apply.go index deb92bea3..b89b1eb29 100644 --- a/commands/apply.go +++ b/commands/apply.go @@ -22,7 +22,7 @@ var cmdApply = &Command{ ## Examples: $ hub apply https://github.com/jingweno/gh/pull/55 - > curl https://github.com/jingweno/gh/pull/55.patch -o /tmp/55.patch + > curl https://github.com/jingweno/gh/pull/55.patch -o /tmp/55.patch -L > git apply /tmp/55.patch ## See also: @@ -46,7 +46,7 @@ var cmdAm = &Command{ ## Examples: $ hub am -3 https://github.com/jingweno/gh/pull/55 - > curl https://github.com/jingweno/gh/pull/55.patch -o /tmp/55.patch + > curl https://github.com/jingweno/gh/pull/55.patch -o /tmp/55.patch -L > git am -3 /tmp/55.patch ## See also: