[Patchew-devel] [PATCH] cli: Fix git fetch cmdline

fam@euphon.net posted 1 patch 3 years, 6 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/patchew-ci tags/patchew/20201022144446.3989941-1-fam@euphon.net
There is a newer version of this series
patchew-cli | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[Patchew-devel] [PATCH] cli: Fix git fetch cmdline
Posted by fam@euphon.net 3 years, 6 months ago
From: Fam Zheng <fam@euphon.net>

The argument causes an error when doing git-fetch.  Seems to be a bug
introduced in 7e35f90584.
---
 patchew-cli | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/patchew-cli b/patchew-cli
index 9cfdf36..a7828b1 100755
--- a/patchew-cli
+++ b/patchew-cli
@@ -71,7 +71,7 @@ def git_clone_repo(clone, remote, head, logf, checkout=True, recursive=False):
     )
     if head.startswith("refs/tags/"):
         subprocess.check_call(
-            ["git", "fetch", remote_name, "+%s:%s" % (head, head)],
+            ["git", "fetch", remote_name, head],
             cwd=cache_repo,
             stdout=logf,
             stderr=logf,
-- 
2.25.1



_______________________________________________
Patchew-devel mailing list
Patchew-devel@redhat.com
https://www.redhat.com/mailman/listinfo/patchew-devel

Re: [Patchew-devel] [PATCH] cli: Fix git fetch cmdline
Posted by Paolo Bonzini 3 years, 6 months ago
On 22/10/20 16:44, fam@euphon.net wrote:
>      if head.startswith("refs/tags/"):
>          subprocess.check_call(
> -            ["git", "fetch", remote_name, "+%s:%s" % (head, head)],
> +            ["git", "fetch", remote_name, head],

You should add --force too, I think.

Paolo

_______________________________________________
Patchew-devel mailing list
Patchew-devel@redhat.com
https://www.redhat.com/mailman/listinfo/patchew-devel

Re: [Patchew-devel] [PATCH] cli: Fix git fetch cmdline
Posted by Fam Zheng 3 years, 6 months ago
On Thu, 2020-10-22 at 15:44 +0100, fam@euphon.net wrote:
> From: Fam Zheng <fam@euphon.net>
> 
> The argument causes an error when doing git-fetch.  Seems to be a bug
> introduced in 7e35f90584.

NACK, the problem is not in the command line syntax, I misunderstood.


> ---
>  patchew-cli | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/patchew-cli b/patchew-cli
> index 9cfdf36..a7828b1 100755
> --- a/patchew-cli
> +++ b/patchew-cli
> @@ -71,7 +71,7 @@ def git_clone_repo(clone, remote, head, logf,
> checkout=True, recursive=False):
>      )
>      if head.startswith("refs/tags/"):
>          subprocess.check_call(
> -            ["git", "fetch", remote_name, "+%s:%s" % (head, head)],
> +            ["git", "fetch", remote_name, head],
>              cwd=cache_repo,
>              stdout=logf,
>              stderr=logf,

_______________________________________________
Patchew-devel mailing list
Patchew-devel@redhat.com
https://www.redhat.com/mailman/listinfo/patchew-devel