{"thread":{"id":"10278","subject":"[PATCH 4/7] Bisect: factorise \"bisect_write_*\" functions.","startedAt":"2007-10-14T12:29:38Z","lastAt":"2007-10-24T04:09:54Z","messageCount":5,"participants":["Christian Couder","Junio C Hamano","J. Bruce Fields","Andreas Ericsson"],"isPatch":true,"patchVersion":1,"patchTotal":7},"messages":[{"id":"55707","messageId":"20071014142938.d722299c.chriscool@tuxfamily.org","threadId":"10278","inReplyTo":null,"subject":"[PATCH 4/7] Bisect: factorise \"bisect_write_*\" functions.","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2007-10-14T12:29:38Z","receivedAt":"2007-10-14T12:29:38Z","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-bisect.sh |   46 ++++++++++++++++++++--------------------------\n 1 files changed, 20 insertions(+), 26 deletions(-)\n\ndiff --git a/git-bisect.sh b/git-bisect.sh\nindex 94534e6..847250c 100755\n--- a/git-bisect.sh\n+++ b/git-bisect.sh\n@@ -108,9 +108,9 @@ bisect_start() {\n \t\t}\n \t\tif [ $bad_seen -eq 0 ]; then\n \t\t    bad_seen=1\n-\t\t    bisect_write_bad \"$rev\"\n+\t\t    bisect_write 'bad' \"$rev\"\n \t\telse\n-\t\t    bisect_write_good \"$rev\"\n+\t\t    bisect_write 'good' \"$rev\"\n \t\tfi\n \t\tshift\n \t\t;;\n@@ -122,6 +122,18 @@ bisect_start() {\n \tbisect_auto_next\n }\n \n+bisect_write() {\n+\tstate=\"$1\"\n+\trev=\"$2\"\n+\tcase \"$state\" in\n+\t\tbad)\t\ttag=\"$state\" ;;\n+\t\tgood|dunno)\ttag=\"$state\"-\"$rev\" ;;\n+\t\t*)\t\tdie \"Bad bisect_write argument: $state\" ;;\n+\tesac\n+\techo \"$rev\" >\"$GIT_DIR/refs/bisect/$tag\"\n+\techo \"# $state: \"$(git show-branch $rev) >>\"$GIT_DIR/BISECT_LOG\"\n+}\n+\n bisect_bad() {\n \tbisect_autostart\n \tcase \"$#\" in\n@@ -132,17 +144,11 @@ bisect_bad() {\n \t*)\n \t\tusage ;;\n \tesac || exit\n-\tbisect_write_bad \"$rev\"\n+\tbisect_write 'bad' \"$rev\"\n \techo \"git-bisect bad $rev\" >>\"$GIT_DIR/BISECT_LOG\"\n \tbisect_auto_next\n }\n \n-bisect_write_bad() {\n-\trev=\"$1\"\n-\techo \"$rev\" >\"$GIT_DIR/refs/bisect/bad\"\n-\techo \"# bad: \"$(git show-branch $rev) >>\"$GIT_DIR/BISECT_LOG\"\n-}\n-\n bisect_good() {\n \tbisect_autostart\n \tcase \"$#\" in\n@@ -153,18 +159,12 @@ bisect_good() {\n \tfor rev in $revs\n \tdo\n \t\trev=$(git rev-parse --verify \"$rev^{commit}\") || exit\n-\t\tbisect_write_good \"$rev\"\n+\t\tbisect_write 'good' \"$rev\"\n \t\techo \"git-bisect good $rev\" >>\"$GIT_DIR/BISECT_LOG\"\n \tdone\n \tbisect_auto_next\n }\n \n-bisect_write_good() {\n-\trev=\"$1\"\n-\techo \"$rev\" >\"$GIT_DIR/refs/bisect/good-$rev\"\n-\techo \"# good: \"$(git show-branch $rev) >>\"$GIT_DIR/BISECT_LOG\"\n-}\n-\n bisect_dunno() {\n \tbisect_autostart\n \tcase \"$#\" in\n@@ -175,18 +175,12 @@ bisect_dunno() {\n \tfor rev in $revs\n \tdo\n \t\trev=$(git rev-parse --verify \"$rev^{commit}\") || exit\n-\t\tbisect_write_dunno \"$rev\"\n+\t\tbisect_write 'dunno' \"$rev\"\n \t\techo \"git-bisect dunno $rev\" >>\"$GIT_DIR/BISECT_LOG\"\n \tdone\n \tbisect_auto_next\n }\n \n-bisect_write_dunno() {\n-\trev=\"$1\"\n-\techo \"$rev\" >\"$GIT_DIR/refs/bisect/dunno-$rev\"\n-\techo \"# dunno: \"$(git show-branch $rev) >>\"$GIT_DIR/BISECT_LOG\"\n-}\n-\n bisect_next_check() {\n \tmissing_good= missing_bad=\n \tgit show-ref -q --verify refs/bisect/bad || missing_bad=t\n@@ -395,15 +389,15 @@ bisect_replay () {\n \t\t\teval \"$cmd\"\n \t\t\t;;\n \t\tgood)\n-\t\t\tbisect_write_good \"$rev\"\n+\t\t\tbisect_write 'good' \"$rev\"\n \t\t\techo \"git-bisect good $rev\" >>\"$GIT_DIR/BISECT_LOG\"\n \t\t\t;;\n \t\tbad)\n-\t\t\tbisect_write_bad \"$rev\"\n+\t\t\tbisect_write 'bad' \"$rev\"\n \t\t\techo \"git-bisect bad $rev\" >>\"$GIT_DIR/BISECT_LOG\"\n \t\t\t;;\n \t\tdunno)\n-\t\t\tbisect_write_dunno \"$rev\"\n+\t\t\tbisect_write 'dunno' \"$rev\"\n \t\t\techo \"git-bisect dunno $rev\" >>\"$GIT_DIR/BISECT_LOG\"\n \t\t\t;;\n \t\t*)\n-- \n1.5.3.4.213.g68ad5\n"},{"id":"57031","messageId":"7v640x7a4n.fsf@gitster.siamese.dyndns.org","threadId":"10278","inReplyTo":"20071014142938.d722299c.chriscool@tuxfamily.org","subject":"Re: [PATCH 4/7] Bisect: factorise \"bisect_write_*\" functions.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-10-23T22:13:12Z","receivedAt":"2007-10-23T22:13:12Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Sort of offtopic, but is \"factorise\" a correct verb here?  I\nthought \"factorise\" is to express a non prime number as the\nproduct of prime numbers.\n\n\"refactor\" is the act of splitting and merging pieces of\nfunctions for better reuse, isn't it?\n"},{"id":"57033","messageId":"20071023222938.GE1115@fieldses.org","threadId":"10278","inReplyTo":"7v640x7a4n.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH 4/7] Bisect: factorise \"bisect_write_*\" functions.","fromName":"J. Bruce Fields","fromEmail":"bfields@fieldses.org","sentAt":"2007-10-23T22:29:38Z","receivedAt":"2007-10-23T22:29:38Z","isPatch":true,"sender":{"key":"bfields@citi.umich.edu","avatar":null},"body":"On Tue, Oct 23, 2007 at 03:13:12PM -0700, Junio C Hamano wrote:\n> Sort of offtopic, but is \"factorise\" a correct verb here?  I\n> thought \"factorise\" is to express a non prime number as the\n> product of prime numbers.\n\n\"Factor\" is a perfectly good verb on its own, no need for the \"ise\"\nnormally.\n\n--b.\n"},{"id":"57034","messageId":"471E7766.6000303@op5.se","threadId":"10278","inReplyTo":"7v640x7a4n.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH 4/7] Bisect: factorise \"bisect_write_*\" functions.","fromName":"Andreas Ericsson","fromEmail":"ae@op5.se","sentAt":"2007-10-23T22:36:22Z","receivedAt":"2007-10-23T22:36:22Z","isPatch":true,"sender":{"key":"ae@op5.se","avatar":"https://gravatar.com/avatar/426e89595c75a8f5252dd0c989e5fabe5bcac616e68557427ad9aef6b0ca342a?d=mp&s=160"},"body":"Junio C Hamano wrote:\n> Sort of offtopic, but is \"factorise\" a correct verb here?  I\n> thought \"factorise\" is to express a non prime number as the\n> product of prime numbers.\n> \n\nIt's the reverse of expanding brackets, like so:\n2x² + x - 3 = (2x + 3)(x - 1)\n\n> \"refactor\" is the act of splitting and merging pieces of\n> functions for better reuse, isn't it?\n> \n\nYes.\n\n-- \nAndreas Ericsson                   andreas.ericsson@op5.se\nOP5 AB                             www.op5.se\nTel: +46 8-230225                  Fax: +46 8-230231\n"},{"id":"57052","messageId":"200710240609.54597.chriscool@tuxfamily.org","threadId":"10278","inReplyTo":"7v640x7a4n.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH 4/7] Bisect: factorise \"bisect_write_*\" functions.","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2007-10-24T04:09:54Z","receivedAt":"2007-10-24T04:09:54Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"Le mercredi 24 octobre 2007, Junio C Hamano a écrit :\n> Sort of offtopic, but is \"factorise\" a correct verb here?  I\n> thought \"factorise\" is to express a non prime number as the\n> product of prime numbers.\n\nEnglish is not my mother tongue so I very often make mistakes.\nSorry about that.\n\nAnyway my prefered online dictionary finds it:\n\nhttp://www.wordreference.com/definition/factorise\n\n> \"refactor\" is the act of splitting and merging pieces of\n> functions for better reuse, isn't it?\n\nYes, it would be better.\n\nI used \"factorise\" because as a french native speaker, I am always tempted \nto use word that sound the same as their french translation.\n\nBy the way I realised that the \"bisect_write\" function is still \nmissing 'nolog=\"$3\"', so I will send an updated patch.\n\nThanks,\nChristian.\n"}]}