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

Re: MinGW port usable

From
Junio C Hamano <junkio@cox.net>
Date
Jan 30, 2007, 05:53 UTC
Message-ID
<7vveip5acn.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<200701292320.43888.johannes.sixt@telecom.at>
Johannes Sixt <johannes.sixt@telecom.at> writes:
Show 6 quoted lines
> Junio, you may like to cherry-pick these two non-critical commits from my 
> repository:
>
> 8c8bb94f94f1d972c7ffadda4744cf343fac6f34 gitk: Use peek-remote instead of 
> ls-remote.
> 46580d2192d79a469f8b40fc1081db9116ad5517 Add a missing fork() error check.
Thanks; cherry-picked the fork() one.

Regarding gitk, I think the following patch would be better regardless of the platform.

-- >8 -- [PATCH] gitk: Use show-ref instead of ls-remote

It used to be ls-remote on self was the only easy way to grab the ref information. Now we have show-ref which does not involve fork and IPC, so use it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
---
diff --git a/gitk b/gitk
index 31d0aad..67e6a64 100755
--- a/gitk
+++ b/gitk
@@ -309,9 +309,9 @@ proc readrefs {} {
     foreach v {tagids idtags headids idheads otherrefids idotherrefs} {
 	catch {unset $v}
     }
-    set refd [open [list | git ls-remote [gitdir]] r]
+    set refd [open [list | git show-ref] r]
     while {0 <= [set n [gets $refd line]]} {
-	if {![regexp {^([0-9a-f]{40})	refs/([^^]*)$} $line \
+	if {![regexp {^([0-9a-f]{40}) refs/([^^]*)$} $line \
 	    match id path]} {
 	    continue
 	}
Previous: Johannes SixtNext: H. Peter Anvin
Message 32 of 39 in “MinGW port usable”
  1. Johannes SixtJan 29, 2007
  2. Shawn O. PearceJan 29, 2007
  3. Christian MICHONJan 29, 2007
  4. Shawn O. PearceJan 29, 2007
  5. Christian MICHONJan 29, 2007
  6. Christian MICHONJan 30, 2007
  7. Christian MICHONJan 30, 2007
  8. Johannes SchindelinJan 30, 2007
  9. Shawn O. PearceJan 30, 2007
  10. Johannes SixtJan 30, 2007
  11. Johannes SixtJan 30, 2007
  12. Linus TorvaldsJan 29, 2007
  13. Christian MICHONJan 29, 2007
  14. Johannes SchindelinJan 30, 2007
  15. Christian MICHONJan 30, 2007
  16. Johannes SixtJan 30, 2007
  17. Johannes SchindelinJan 30, 2007
  18. Shawn O. PearceJan 30, 2007
  19. Johannes SchindelinJan 30, 2007
  20. Shawn O. PearceJan 30, 2007
  21. Johannes SchindelinJan 30, 2007
  22. Shawn O. PearceJan 30, 2007
  23. Johannes SchindelinJan 30, 2007
  24. Daniel BarkalowJan 30, 2007
  25. Johannes SixtJan 30, 2007
  26. Andreas EricssonJan 30, 2007
  27. Johannes SchindelinJan 30, 2007
  28. Daniel BarkalowJan 30, 2007
  29. Johannes SchindelinJan 30, 2007
  30. Daniel BarkalowJan 30, 2007
  31. Johannes SixtJan 30, 2007
  32. Junio C HamanoJan 30, 2007
  33. H. Peter AnvinFeb 1, 2007
  34. Johannes SixtFeb 1, 2007
  35. H. Peter AnvinFeb 1, 2007
  36. H. Peter AnvinFeb 2, 2007
  37. Davide LibenziFeb 2, 2007
  38. Johannes SixtFeb 2, 2007
  39. H. Peter AnvinFeb 2, 2007

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.