git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Use git-update-ref in scripts.

From
Linus Torvalds <torvalds@osdl.org>
Date
Sep 28, 2005, 18:14 UTC
Message-ID
<Pine.LNX.4.58.0509281106370.3308@g5.osdl.org>
In-Reply-To
<7v3bnpt81e.fsf@assigned-by-dhcp.cox.net>
On Wed, 28 Sep 2005, Junio C Hamano wrote:
>
> I was wondering the URL shorthand you mentioned is being used in
> practice.  In theory, you do not "have to write out in full"
> anymore ;-).
Almost always, I end up cut-and-pasting the thing from an email.

In many ways, the most irritating part for me about that is that an email that wants to give a publically accessible part has to be something like

   "Please pull from
      rsync://rsync.kernel.org/path
    to get the xyz updates"

and then I cut-and-paste it but have to delete the "rsync://", and replace the "rsync.kernel.org/" with "master.kernel.org:/".

Sad.

So I've actually considered a totally Linus-only hack that does that automatically, ie something like this untested patch.. (same goes for http too, for that matter)

		Linus
diff --git a/git-parse-remote.sh b/git-parse-remote.sh
--- a/git-parse-remote.sh
+++ b/git-parse-remote.sh
@@ -32,7 +32,7 @@ get_remote_url () {
 	data_source=$(get_data_source "$1")
 	case "$data_source" in
 	'')
-		echo "$1" ;;
+		echo "$1" | sed 's/rsync:[^/]*kernel.org/master.kernel.org:/ ;;
 	remotes)
 		sed -ne '/^URL: */{
 			s///p
Previous: Junio C HamanoNext: Junio C Hamano
Message 9 of 19 in “Add "git-update-ref" to update the HEAD (or other) ref”
  1. Linus TorvaldsSep 25, 2005
  2. Linus TorvaldsSep 25, 2005
  3. Junio C HamanoSep 25, 2005
  4. Use git-update-ref in scripts.Junio C Hamano, Sep 28, 2005
  5. Linus TorvaldsSep 28, 2005
  6. Junio C HamanoSep 28, 2005
  7. Linus TorvaldsSep 28, 2005
  8. Junio C HamanoSep 28, 2005
  9. Linus TorvaldsSep 28, 2005
  10. Junio C HamanoSep 28, 2005
  11. Linus TorvaldsSep 29, 2005
  12. Junio C HamanoSep 28, 2005
  13. Junio C HamanoSep 28, 2005
  14. Fredrik KuivinenSep 28, 2005
  15. Linus TorvaldsSep 29, 2005
  16. Junio C HamanoSep 25, 2005
  17. Linus TorvaldsSep 26, 2005
  18. Junio C HamanoSep 26, 2005
  19. Linus TorvaldsSep 26, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.