git urls: prefix with GIT_PROTO_PREFIX
PATCH 1/1 git urls: prefix with GIT_PROTO_PREFIX
This allows the prefixing of all git clone and fetch URLs with a single fixed string. This could be used to:
- clone from a local tree /path/to/something/git:/whatever/thing
- use a cacheing git proxy such as found in chiark-utils
--- Config.mk | 8 ++++---- tools/firmware/etherboot/Makefile | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-)
Config.mk +4 -4
@@ -252,10 +252,10 @@ QEMU_UPSTREAM_URL ?= http://xenbits.xen.org/git-http/qemu-upstream-unstable.git QEMU_TRADITIONAL_URL ?= http://xenbits.xen.org/git-http/qemu-xen-unstable.git SEABIOS_UPSTREAM_URL ?= http://xenbits.xen.org/git-http/seabios.git else -OVMF_UPSTREAM_URL ?= git://xenbits.xen.org/ovmf.git -QEMU_UPSTREAM_URL ?= git://xenbits.xen.org/qemu-upstream-unstable.git -QEMU_TRADITIONAL_URL ?= git://xenbits.xen.org/qemu-xen-unstable.git -SEABIOS_UPSTREAM_URL ?= git://xenbits.xen.org/seabios.git +OVMF_UPSTREAM_URL ?= $(GIT_PROTO_PREFIX)git://xenbits.xen.org/ovmf.git +QEMU_UPSTREAM_URL ?= $(GIT_PROTO_PREFIX)git://xenbits.xen.org/qemu-upstream-unstable.git +QEMU_TRADITIONAL_URL ?= $(GIT_PROTO_PREFIX)git://xenbits.xen.org/qemu-xen-unstable.git +SEABIOS_UPSTREAM_URL ?= $(GIT_PROTO_PREFIX)git://xenbits.xen.org/seabios.git endif OVMF_UPSTREAM_REVISION ?= 447d264115c476142f884af0be287622cd244423 QEMU_UPSTREAM_REVISION ?= master
tools/firmware/etherboot/Makefile +1 -1
@@ -7,7 +7,7 @@ include Config ifeq ($(GIT_HTTP),y) IPXE_GIT_URL ?= http://git.ipxe.org/ipxe.git else -IPXE_GIT_URL ?= git://git.ipxe.org/ipxe.git +IPXE_GIT_URL ?= $(GIT_PROTO_PREFIX)git://git.ipxe.org/ipxe.git endif IPXE_GIT_TAG := 9a93db3f0947484e30e753bbd61a10b17336e20e
Signature · 1 line
1.7.10.4
Quoted 4 lines · Ian Jackson
This allows the prefixing of all git clone and fetch URLs with a single fixed string. This could be used to:
- clone from a local tree /path/to/something/git:/whatever/thing
- use a cacheing git proxy such as found in chiark-utils
Is this intended as a for-personal-use version of the munging osstest does?
I've no problem with the patch but two idle thoughts:
Should the default be "git://" (and that prefix dropped from the values) to reduce the odd naming requirements for local trees?
Could this be done globally for a user via .gitconfig and pullInsteadOf? Perhaps with:
[url "git://"]
pullInsteadOf = "/path/to/something/git:/"
or (more usefully perhaps) the equivalent proxy rune?
Ian.
Ian Campbell writes ("Re: [PATCH] git urls: prefix with GIT_PROTO_PREFIX"):
Quoted 8 lines · Ian Jackson
Quoted 4 lines
This allows the prefixing of all git clone and fetch URLs with a single fixed string. This could be used to:
- clone from a local tree /path/to/something/git:/whatever/thing
- use a cacheing git proxy such as found in chiark-utilsIs this intended as a for-personal-use version of the munging osstest does?
I just used it like that to test George's tarball series. osstest could probably usefully use it too.
Quoted 4 lines
I've no problem with the patch but two idle thoughts:
Should the default be "
git://" (and that prefix dropped from the values) to reduce the odd naming requirements for local trees?
Maybe. I decided not, because the way I did it makes the actual usual URLs nice and clear.
Quoted 5 lines
Could this be done globally for a user via .gitconfig and pullInsteadOf? Perhaps with:
[url "git://"]
pullInsteadOf = "/path/to/something/git:/"
or (more usefully perhaps) the equivalent proxy rune?
You would have to list all of the urls. There isn't a formal way to extract them from the xen.git tree (there's git grep and sed, but that's pretty yucky and not necessary reliable).
Ian.
Quoted 13 lines · Ian Jackson
Ian Campbell writes ("Re: [PATCH] git urls: prefix with
GIT_PROTO_PREFIX"):Quoted 8 lines · Ian Jackson
Quoted 4 lines
This allows the prefixing of all git clone and fetch URLs with a single fixed string. This could be used to:
- clone from a local tree /path/to/something/git:/whatever/thing
- use a cacheing git proxy such as found in chiark-utilsIs this intended as a for-personal-use version of the munging osstest does?
I just used it like that to test George's tarball series. osstest could probably usefully use it too.
Quoted 7 lines
Quoted 4 lines
I've no problem with the patch but two idle thoughts:
Should the default be "
git://" (and that prefix dropped from the values) to reduce the odd naming requirements for local trees?Maybe. I decided not, because the way I did it makes the actual usual URLs nice and clear.
That's a good argument.
Quoted 9 lines
Quoted 5 lines
Could this be done globally for a user via .gitconfig and pullInsteadOf? Perhaps with:
[url "git://"]
pullInsteadOf = "/path/to/something/git:/"
or (more usefully perhaps) the equivalent proxy rune?You would have to list all of the urls. There isn't a formal way to extract them from the xen.git tree (there's git grep and sed, but that's pretty yucky and not necessary reliable).
I meant the "git://" above literally, i.e. transliterate everything starting with "git://".
Not terribly desirable for the path based usage, I'll admit.
Ian.
Ian Campbell writes ("Re: [PATCH] git urls: prefix with GIT_PROTO_PREFIX"):
Quoted 7 lines · Ian Jackson
Quoted 3 lines
You would have to list all of the urls. There isn't a formal way to extract them from the xen.git tree (there's git grep and sed, but that's pretty yucky and not necessary reliable).
I meant the "
git://" above literally, i.e. transliterate everything starting with "git://".
Oh. I didn't know you could do that. But I have just RTFM'd and it appears that you could.
Quoted 1 line
Not terribly desirable for the path based usage, I'll admit.
I think I will try messing about with .gitconfig and see if this patch is really needed.
Thanks,
Ian.