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

[PATCH] cg-fetch will now retrieve commits related to tags if missing.

From
MLMartin Langhoff <martin@catalyst.net.nz>
Date
Oct 20, 2005, 00:55 UTC
Message-ID
<1129769745158-git-send-email-martin@catalyst.net.nz>
Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
---
 cg-fetch |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

applies-to: 38ed7981343a8e2bb734d64e019186a8a482dbef 48cb643964910a058881307513cb63aeee28a1de

diff --git a/cg-fetch b/cg-fetch
index 7694584..d4650e5 100755
--- a/cg-fetch
+++ b/cg-fetch
@@ -417,7 +417,8 @@ $get -i -s -u -d "$uri/refs/tags" "$_git
 	for tag in *; do
 		[ "$tag" = "*" ] && break
 		tagid=$(cat $tag)
-		GIT_DIR=../.. git-cat-file -t "$tagid" >/dev/null 2>&1 && continue
+		GIT_DIR=../.. [ "`git-cat-file -t $tagid 2>/dev/null`" = "commit" ] && continue
+		GIT_DIR=../.. git-cat-file commit `git-rev-parse $tag^{commit}  2>/dev/null` 2>&1 >> /dev/null && continue
 		echo -n "Missing object of tag $tag... "
 		if [ "$fetch" != "fetch_rsync" ] && GIT_DIR=../.. $fetch "$tagid" "$uri" 2>/dev/null >&2; then
 			echo "retrieved"
---
0.99.8.GIT
Next: Junio C Hamano
Message 1 of 7 in “cg-fetch will now retrieve commits related to tags if missing.”
  1. cg-fetch will now retrieve commits related to tags if missing.Martin Langhoff, Oct 20, 2005
  2. Junio C HamanoOct 20, 2005
  3. Martin LanghoffOct 20, 2005
  4. Martin LanghoffOct 20, 2005
  5. Junio C HamanoOct 20, 2005
  6. Martin LanghoffOct 20, 2005
  7. Junio C HamanoOct 20, 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.