mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: "Горелов Валентин Владимирович" <gorelov.v@bpa.ru>
To: "ptxdist@pengutronix.de" <ptxdist@pengutronix.de>
Subject: Re: [ptxdist] [PATCH] ptxd_make_get.sh: handle git://file:
Date: Thu, 22 Nov 2018 11:20:58 +0000	[thread overview]
Message-ID: <A8518CE889EF4844A09A9C038E9CA6BF012D90DE91@mos-sr-exch2.bpa.local> (raw)
In-Reply-To: <20181122062032.almth4qg4atbvpkj@pengutronix.de>

[-- Attachment #1: Type: text/plain, Size: 2239 bytes --]

Hello.
Sorry, I have not managed to make "git send-email" work with our mail server. So the patch is an attachment.

Regards,
Valentin Gorelov

-----Original Message-----
From: ptxdist [mailto:ptxdist-bounces@pengutronix.de] On Behalf Of Michael Olbrich
Sent: Thursday, November 22, 2018 9:21 AM
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH] ptxd_make_get.sh: handle git://file:

Hello,

On Tue, Nov 20, 2018 at 03:41:19PM +0000, Горелов Валентин Владимирович wrote:
> I've been using your system for a long time and I find it very 
> convenient. But unfortunately,  it is unable to get sources from local 
> folder-based Git repositories. That would be useful.
> I've made a patch to add this function. May I expect it (or 
> refurbished version of it) to be included in a future release?

Please provide a patch with a proper patch header and including a Signed-of-by line.
And I prefer patches inline (sent with 'git send-email') but attachments are ok as well.

About the patch:

> diff --git a/scripts/lib/ptxd_make_get.sh 
> b/scripts/lib/ptxd_make_get.sh index 17c515644..7c00fe149 100644
> --- a/scripts/lib/ptxd_make_get.sh
> +++ b/scripts/lib/ptxd_make_get.sh
> @@ -394,6 +394,13 @@ ptxd_make_get() {
>  		shift
>  
>  		case "${url}" in
> +		git://file:*)

I think git+file:// is a better syntax for this.

> +			echo "local git repository, removing git://file: prefix from URL"
> +			url=${url#git://file:}
> +

Instead of this:

> +			ptxd_make_get_download_permitted &&
> +			ptxd_make_get_git && return
> +			;;

do this:
			;&

That's the fall-though for bash 'case' statements.

Michael

>  		git://*|http://*.git|https://*.git|ssh://*.git)
>  			ptxd_make_get_download_permitted &&
>  			ptxd_make_get_git && return

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

[-- Attachment #2: 0001-ptxd_make_get_git-add-local-Git-repositories-support.patch --]
[-- Type: application/octet-stream, Size: 854 bytes --]

From c18145f968d2f7a4531723f700599d2688274abf Mon Sep 17 00:00:00 2001
From: Valentin Gorelov <gorelov.v@bpa.ru>
Date: Thu, 22 Nov 2018 12:25:20 +0300
Subject: [PATCH] ptxd_make_get_git: add local Git repositories support

Signed-off-by: Valentin Gorelov <gorelov.v@bpa.ru>
---
 scripts/lib/ptxd_make_get.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/scripts/lib/ptxd_make_get.sh b/scripts/lib/ptxd_make_get.sh
index 17c515644..70de52143 100644
--- a/scripts/lib/ptxd_make_get.sh
+++ b/scripts/lib/ptxd_make_get.sh
@@ -394,6 +394,10 @@ ptxd_make_get() {
 		shift
 
 		case "${url}" in
+		git+file://*)
+			echo "local git repository, removing git+file:// prefix from URL"
+			url=${url#git+file://}
+			;&
 		git://*|http://*.git|https://*.git|ssh://*.git)
 			ptxd_make_get_download_permitted &&
 			ptxd_make_get_git && return
-- 
2.17.1


[-- Attachment #3: Type: text/plain, Size: 91 bytes --]

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

  reply	other threads:[~2018-11-22 11:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-20 15:41 Горелов Валентин Владимирович
2018-11-22  6:20 ` Michael Olbrich
2018-11-22 11:20   ` Горелов Валентин Владимирович [this message]
2018-11-23 10:39 ` Roland Hieber
2018-11-23 14:50   ` Michael Olbrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=A8518CE889EF4844A09A9C038E9CA6BF012D90DE91@mos-sr-exch2.bpa.local \
    --to=gorelov.v@bpa.ru \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox