{"thread":{"id":"9221","subject":"Bug in gitk search box","startedAt":"2007-07-25T13:56:21Z","lastAt":"2007-07-26T08:21:33Z","messageCount":6,"participants":["Brian Downing","Paul Mackerras","Junio C Hamano","Marco Costalba"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"48563","messageId":"20070725135621.GC21692@lavos.net","threadId":"9221","inReplyTo":null,"subject":"Bug in gitk search box","fromName":"Brian Downing","fromEmail":"bdowning@lavos.net","sentAt":"2007-07-25T13:56:21Z","receivedAt":"2007-07-25T13:56:21Z","isPatch":false,"sender":{"key":"bdowning@lavos.net","avatar":"https://avatars.githubusercontent.com/u/366426?v=4"},"body":"To reproduce:\n\n* Open gitk in any repository, the Git one seems to work fine.\n* Type a string that it won't find into the search box, like 'asdfasdf'.\n* Click find.\n\nYou'll get:\n\ncan't read \"commitdata(e83c5163316f89bfbde7d9ab23ca2e25604af290)\": no such element in array\ncan't read \"commitdata(e83c5163316f89bfbde7d9ab23ca2e25604af290)\": no such element in array\n    while executing\n\"doesmatch $commitdata($id)\"\n    (procedure \"findmore\" line 21)\n    invoked from within\n\"findmore\"\n    (\"eval\" body line 1)\n    invoked from within\n\"eval $script\"\n    (procedure \"dorunq\" line 9)\n    invoked from within\n\"dorunq\"\n    (\"after\" script)\n\nWhere the SHA1 is always the earliest SHA1 in the rev-list gitk is\nexamining.\n\nAfter this happens you get a \"busy cursor\" when hovering over most of\ngitk, and you can't search again until gitk is restarted.\n\n-bcd\n"},{"id":"48616","messageId":"18087.60033.676105.538784@cargo.ozlabs.ibm.com","threadId":"9221","inReplyTo":"20070725135621.GC21692@lavos.net","subject":"Re: Bug in gitk search box","fromName":"Paul Mackerras","fromEmail":"paulus@samba.org","sentAt":"2007-07-26T00:27:45Z","receivedAt":"2007-07-26T00:27:45Z","isPatch":false,"sender":{"key":"paulus@samba.org","avatar":"https://avatars.githubusercontent.com/u/1606439?v=4"},"body":"Brian Downing writes:\n\n> * Open gitk in any repository, the Git one seems to work fine.\n> * Type a string that it won't find into the search box, like 'asdfasdf'.\n> * Click find.\n> \n> You'll get:\n> \n> can't read \"commitdata(e83c5163316f89bfbde7d9ab23ca2e25604af290)\": no such element in array\n\nIt turns out that this problem crept in when I changed from using git\nrev-list --header to git log -z --pretty=raw, and the thing that\ncauses it is that git rev-list puts a null character after every\ncommit, while git log only puts a null between commits, i.e., there\nisn't a null after the last commit.\n\nJunio, is this behaviour deliberate?\n\nPaul.\n"},{"id":"48620","messageId":"7vtzrrc1sb.fsf@assigned-by-dhcp.cox.net","threadId":"9221","inReplyTo":"18087.60033.676105.538784@cargo.ozlabs.ibm.com","subject":"Re: Bug in gitk search box","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-07-26T02:54:44Z","receivedAt":"2007-07-26T02:54:44Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Paul Mackerras <paulus@samba.org> writes:\n\n> It turns out that this problem crept in when I changed from using git\n> rev-list --header to git log -z --pretty=raw, and the thing that\n> causes it is that git rev-list puts a null character after every\n> commit, while git log only puts a null between commits, i.e., there\n> isn't a null after the last commit.\n>\n> Junio, is this behaviour deliberate?\n\nThere was a recent message from Linus on the list, stating that\nNUL in -z format is inter-record separator, not after-record\nterminator.\n"},{"id":"48636","messageId":"18088.10039.780711.708582@cargo.ozlabs.ibm.com","threadId":"9221","inReplyTo":"7vtzrrc1sb.fsf@assigned-by-dhcp.cox.net","subject":"Re: Bug in gitk search box","fromName":"Paul Mackerras","fromEmail":"paulus@samba.org","sentAt":"2007-07-26T04:46:47Z","receivedAt":"2007-07-26T04:46:47Z","isPatch":false,"sender":{"key":"paulus@samba.org","avatar":"https://avatars.githubusercontent.com/u/1606439?v=4"},"body":"Junio C Hamano writes:\n\n> There was a recent message from Linus on the list, stating that\n> NUL in -z format is inter-record separator, not after-record\n> terminator.\n\nOK, I'll have to change gitk then.  It looks like both Marco and I got\ntricked by this.  I suggest it's worth a mention in the documentation.\n\nPaul.\n"},{"id":"48645","messageId":"7v1wevbtow.fsf@assigned-by-dhcp.cox.net","threadId":"9221","inReplyTo":"18088.10039.780711.708582@cargo.ozlabs.ibm.com","subject":"Re: Bug in gitk search box","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-07-26T05:49:35Z","receivedAt":"2007-07-26T05:49:35Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Paul Mackerras <paulus@samba.org> writes:\n\n> Junio C Hamano writes:\n>\n>> There was a recent message from Linus on the list, stating that\n>> NUL in -z format is inter-record separator, not after-record\n>> terminator.\n>\n> OK, I'll have to change gitk then.  It looks like both Marco and I got\n> tricked by this.  I suggest it's worth a mention in the documentation.\n\nI think that is indeed necessary.  How about this?\n\n---\ndiff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt\nindex 8216576..228ccaf 100644\n--- a/Documentation/diff-options.txt\n+++ b/Documentation/diff-options.txt\n@@ -43,7 +43,9 @@\n \tSynonym for \"-p --stat\".\n \n -z::\n-\t\\0 line termination on output\n+\tNUL-line termination on output.  This affects the --raw\n+\toutput field terminator.  Also output from commands such\n+\tas \"git-log\" will be delimited with NUL between commits.\n \n --name-only::\n \tShow only names of changed files.\n"},{"id":"48678","messageId":"e5bfff550707260121h7970988cybbdaaa4547f61b25@mail.gmail.com","threadId":"9221","inReplyTo":"18088.10039.780711.708582@cargo.ozlabs.ibm.com","subject":"Re: Bug in gitk search box","fromName":"Marco Costalba","fromEmail":"mcostalba@gmail.com","sentAt":"2007-07-26T08:21:33Z","receivedAt":"2007-07-26T08:21:33Z","isPatch":false,"sender":{"key":"mcostalba@gmail.com","avatar":null},"body":"On 7/26/07, Paul Mackerras <paulus@samba.org> wrote:\n>\n> OK, I'll have to change gitk then.  It looks like both Marco and I got\n> tricked by this.\n\nYes. With commit c1672ba272c8e of 22 of Jun I make qgit to always\nappend a '\\0' at the end of the stream so to avoid to change parsing\nfunction.\n\nMarco\n"}]}