{"thread":{"id":"10860","subject":"[PATCH] Bisect visualize: use \"for-each-ref\" to list all good refs.","startedAt":"2007-11-14T04:50:36Z","lastAt":"2007-11-15T06:43:59Z","messageCount":4,"participants":["Christian Couder","Junio C Hamano","Johannes Sixt"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"59810","messageId":"20071114055036.2c5ae793.chriscool@tuxfamily.org","threadId":"10860","inReplyTo":null,"subject":"[PATCH] Bisect visualize: use \"for-each-ref\" to list all good refs.","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2007-11-14T04:50:36Z","receivedAt":"2007-11-14T04:50:36Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"In bisect_visualize, \"cd $GIT_DIR/refs && echo bisect/good-*\" was\nstill used instead of \"git for-each-ref\". This patch fix it.\n\nWe now pass \"refs/bisect/bad\" and \"--not refs/bisect/good-<rev>\"\ninstead of \"bisect/bad\" and \"--not bisect/good-<rev>\" to gitk,\nbut it seems to work.\n\nSigned-off-by: Christian Couder <chriscool@tuxfamily.org>\n---\n git-bisect.sh |    4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/git-bisect.sh b/git-bisect.sh\nindex 1ed44e5..8d75d91 100755\n--- a/git-bisect.sh\n+++ b/git-bisect.sh\n@@ -326,8 +326,8 @@ bisect_next() {\n \n bisect_visualize() {\n \tbisect_next_check fail\n-\tnot=`cd \"$GIT_DIR/refs\" && echo bisect/good-*`\n-\teval gitk bisect/bad --not $not -- $(cat \"$GIT_DIR/BISECT_NAMES\")\n+\tnot=$(git for-each-ref --format='%(refname)' \"refs/bisect/good-*\")\n+\teval gitk refs/bisect/bad --not $not -- $(cat \"$GIT_DIR/BISECT_NAMES\")\n }\n \n bisect_reset() {\n-- \n1.5.3.5.629.g807b3\n"},{"id":"59823","messageId":"7voddxkzzw.fsf@gitster.siamese.dyndns.org","threadId":"10860","inReplyTo":"20071114055036.2c5ae793.chriscool@tuxfamily.org","subject":"Re: [PATCH] Bisect visualize: use \"for-each-ref\" to list all good refs.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-11-14T08:11:47Z","receivedAt":"2007-11-14T08:11:47Z","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> In bisect_visualize, \"cd $GIT_DIR/refs && echo bisect/good-*\" was\n> still used instead of \"git for-each-ref\". This patch fix it.\n\nHeh, it still uses\n\n\techo \"$rev\" >\"$GIT_DIR/refs/bisect/$tag\"\n\nSo we are still _very_ much tied to refs on the filesystem not\nin packed-refs.\n\nEven worse is that bisect_clean_state uses\n\n\trm -fr \"$GIT_DIR/refs/bisect\"\n\nso if you ever pack your refs in the middle of bisection and\nthen clean the state, you will still carry the old good set of\ncommits that are somewhat hard to cull.\n"},{"id":"59841","messageId":"473AC87E.90107@viscovery.net","threadId":"10860","inReplyTo":"7voddxkzzw.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] Bisect visualize: use \"for-each-ref\" to list all good refs.","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2007-11-14T10:05:50Z","receivedAt":"2007-11-14T10:05:50Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Junio C Hamano schrieb:\n> Even worse is that bisect_clean_state uses\n> \n> \trm -fr \"$GIT_DIR/refs/bisect\"\n> \n> so if you ever pack your refs in the middle of bisection and\n> then clean the state, you will still carry the old good set of\n> commits that are somewhat hard to cull.\n\nHeh. I think I'd done this once, and couldn't get rid of those refs with \n'git-bisect reset'. Now I know why.\n\n-- Hannes\n"},{"id":"59932","messageId":"200711150743.59716.chriscool@tuxfamily.org","threadId":"10860","inReplyTo":"7voddxkzzw.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] Bisect visualize: use \"for-each-ref\" to list all good refs.","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2007-11-15T06:43:59Z","receivedAt":"2007-11-15T06:43:59Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"Le mercredi 14 novembre 2007, Junio C Hamano a écrit :\n> Christian Couder <chriscool@tuxfamily.org> writes:\n> > In bisect_visualize, \"cd $GIT_DIR/refs && echo bisect/good-*\" was\n> > still used instead of \"git for-each-ref\". This patch fix it.\n>\n> Heh, it still uses\n>\n> \techo \"$rev\" >\"$GIT_DIR/refs/bisect/$tag\"\n>\n> So we are still _very_ much tied to refs on the filesystem not\n> in packed-refs.\n\nYes, but someone (guess who) started to modernize git-bisect by \nusing \"for-each-ref\":\n\nhttp://git.kernel.org/?p=git/git.git;a=commitdiff;h=6fecf1915c5fd0b14e2ca2ec9e1a6b620abfb5c2\nhttp://git.kernel.org/?p=git/git.git;a=commitdiff;h=0a5280a9f444c33b0e4ebf2f073df5899c112cf8\n\nso I thought it would be fine to finish this modernization work.\n\n> Even worse is that bisect_clean_state uses\n>\n> \trm -fr \"$GIT_DIR/refs/bisect\"\n>\n> so if you ever pack your refs in the middle of bisection and\n> then clean the state, you will still carry the old good set of\n> commits that are somewhat hard to cull.\n\nThanks for reminding me of this problem. I just posted a patch that should \nfix it.\n\nBest regards,\nChristian.\n"}]}