{"thread":{"id":"2160","subject":"[PATCH] cg-fetch: handle tags with funny chars, retrieve missing commits","startedAt":"2005-10-20T04:45:24Z","lastAt":"2005-10-20T05:05:58Z","messageCount":2,"participants":["Martin Langhoff"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"10337","messageId":"11297835242417-git-send-email-martin@catalyst.net.nz","threadId":"2160","inReplyTo":null,"subject":"[PATCH] cg-fetch: handle tags with funny chars, retrieve missing commits","fromName":"Martin Langhoff","fromEmail":"martin@catalyst.net.nz","sentAt":"2005-10-20T04:45:24Z","receivedAt":"2005-10-20T04:45:24Z","isPatch":true,"sender":{"key":"martin@laptop.org","avatar":null},"body":" + handles tags with funny chars a bit better\n + will check tagrefs, trying to ensure it actually has the relevant\n   commits. If the commits are missing, it'll go out and fetch them.\n\nThis isn't a complete solution for cg-fetch -- git-fetch is actually\nmuch smarter now, and cg-fetch should perhaps be a thin wrapper\naround it, dropping all the duplicate code.\n\nSigned-off-by: Martin Langhoff <martin@catalyst.net.nz>\n\n\n---\n\n cg-fetch |    5 +++--\n 1 files changed, 3 insertions(+), 2 deletions(-)\n\napplies-to: 38ed7981343a8e2bb734d64e019186a8a482dbef\n21a91d74a6807677f8e59c737fee3692d0f392e8\ndiff --git a/cg-fetch b/cg-fetch\nindex 7694584..625444c 100755\n--- a/cg-fetch\n+++ b/cg-fetch\n@@ -416,8 +416,9 @@ $get -i -s -u -d \"$uri/refs/tags\" \"$_git\n \tcd $_git/refs/tags\n \tfor tag in *; do\n \t\t[ \"$tag\" = \"*\" ] && break\n-\t\ttagid=$(cat $tag)\n-\t\tGIT_DIR=../.. git-cat-file -t \"$tagid\" >/dev/null 2>&1 && continue\n+\t\ttagid=$(cat \"$tag\")\n+\t\tGIT_DIR=../.. git-cat-file commit `git-rev-parse --verify \"$tag\"^{commit} 2>/dev/null` 2>/dev/null >> /dev/null && continue\n+\t\tGIT_DIR=../.. git-cat-file blob `git-rev-parse --verify \"$tag\"^{blob} 2>/dev/null` 2>/dev/null >> /dev/null && continue\n \t\techo -n \"Missing object of tag $tag... \"\n \t\tif [ \"$fetch\" != \"fetch_rsync\" ] && GIT_DIR=../.. $fetch \"$tagid\" \"$uri\" 2>/dev/null >&2; then\n \t\t\techo \"retrieved\"\n---\n0.99.8.GIT\n"},{"id":"10341","messageId":"46a038f90510192205jd4f3a12j60799f043ee31f85@mail.gmail.com","threadId":"2160","inReplyTo":"11297835242417-git-send-email-martin@catalyst.net.nz","subject":"Re: [PATCH] cg-fetch: handle tags with funny chars, retrieve missing commits","fromName":"Martin Langhoff","fromEmail":"martin.langhoff@gmail.com","sentAt":"2005-10-20T05:05:58Z","receivedAt":"2005-10-20T05:05:58Z","isPatch":true,"sender":{"key":"martin.langhoff@gmail.com","avatar":"https://gravatar.com/avatar/1e3f311b6c4c15836501901ca58f8c0b0667246488084ba524d8bc9867e22fd9?d=mp&s=160"},"body":"Pulled, superceded by new version.\n\nOn 10/20/05, Martin Langhoff <martin@catalyst.net.nz> wrote:\n>  + handles tags with funny chars a bit better\n>  + will check tagrefs, trying to ensure it actually has the relevant\n>    commits. If the commits are missing, it'll go out and fetch them.\n>\n> This isn't a complete solution for cg-fetch -- git-fetch is actually\n> much smarter now, and cg-fetch should perhaps be a thin wrapper\n> around it, dropping all the duplicate code.\n>\n> Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>\n"}]}