{"thread":{"id":"5782","subject":"[PATCH] Check that a tag exists using show-ref instead of looking for the ref file.","startedAt":"2006-10-01T20:33:04Z","lastAt":"2006-10-03T20:26:30Z","messageCount":4,"participants":["Christian Couder","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"28086","messageId":"20061001223304.d37df36f.chriscool@tuxfamily.org","threadId":"5782","inReplyTo":null,"subject":"[PATCH] Check that a tag exists using show-ref instead of looking for the ref file.","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2006-10-01T20:33:04Z","receivedAt":"2006-10-01T20:33:04Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"Signed-off-by: Christian Couder <chriscool@tuxfamily.org>\n---\n git-tag.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/git-tag.sh b/git-tag.sh\nindex 6463b31..a3f1819 100755\n--- a/git-tag.sh\n+++ b/git-tag.sh\n@@ -66,7 +66,7 @@ done\n name=\"$1\"\n [ \"$name\" ] || usage\n prev=0000000000000000000000000000000000000000\n-if test -e \"$GIT_DIR/refs/tags/$name\"\n+if git-show-ref --verify --quiet -- \"refs/tags/$name\"\n then\n     test -n \"$force\" || die \"tag '$name' already exists\"\n     prev=`git rev-parse \"refs/tags/$name\"`\n-- \n1.4.2.1.gd567\n"},{"id":"28140","messageId":"7vlknxrcja.fsf@assigned-by-dhcp.cox.net","threadId":"5782","inReplyTo":"20061001223304.d37df36f.chriscool@tuxfamily.org","subject":"Re: [PATCH] Check that a tag exists using show-ref instead of looking for the ref file.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-10-03T09:09:29Z","receivedAt":"2006-10-03T09:09:29Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thanks.  We also need this to avoid refetching already packed\ntags.\n\n-- >8 --\n[PATCH] git-fetch: do not look into $GIT_DIR/refs to see if a tag exists.\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n---\n git-fetch.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/git-fetch.sh b/git-fetch.sh\nindex f1522bd..e8a7668 100755\n--- a/git-fetch.sh\n+++ b/git-fetch.sh\n@@ -417,7 +417,7 @@ case \"$no_tags$tags\" in\n \t\tsed -ne 's|^\\([0-9a-f]*\\)[ \t]\\(refs/tags/.*\\)^{}$|\\1 \\2|p' |\n \t\twhile read sha1 name\n \t\tdo\n-\t\t\ttest -f \"$GIT_DIR/$name\" && continue\n+\t\t\tgit-show-ref --verify --quiet -- $name && continue\n \t\t\tgit-check-ref-format \"$name\" || {\n \t\t\t\techo >&2 \"warning: tag ${name} ignored\"\n \t\t\t\tcontinue\n-- \n1.4.2.3.gd1e9e\n"},{"id":"28178","messageId":"200610032211.05847.chriscool@tuxfamily.org","threadId":"5782","inReplyTo":"7vlknxrcja.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Check that a tag exists using show-ref instead of looking for the ref file.","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2006-10-03T20:11:05Z","receivedAt":"2006-10-03T20:11:05Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"Junio C Hamano wrote:\n> Thanks.  We also need this to avoid refetching already packed\n> tags.\n\nYeah, I did a very quick check on the shell scripts and I obviously missed \nsome places that need updates.\n\nIn fact, I couldn't resist to start implementing the deleted-refs/$frotz~ref \nstuff we talked about...\n\nChristian.\n"},{"id":"28184","messageId":"7virj1m9hl.fsf@assigned-by-dhcp.cox.net","threadId":"5782","inReplyTo":"200610032211.05847.chriscool@tuxfamily.org","subject":"Re: [PATCH] Check that a tag exists using show-ref instead of looking for the ref file.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-10-03T20:26:30Z","receivedAt":"2006-10-03T20:26:30Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Christian Couder <chriscool@tuxfamily.org> writes:\n\n> Junio C Hamano wrote:\n>> Thanks.  We also need this to avoid refetching already packed\n>> tags.\n>\n> Yeah, I did a very quick check on the shell scripts and I obviously missed \n> some places that need updates.\n>\n> In fact, I couldn't resist to start implementing the deleted-refs/$frotz~ref \n> stuff we talked about...\n\nHow would that help?  We need to audit the existing scripts\nsince they would not look under $GIT_DIR/deleted-refs currently\nanyway.\n"}]}