{"thread":{"id":"60602","subject":"Bug in SVN.pm","startedAt":"2023-12-11T22:51:53Z","lastAt":"2023-12-12T01:43:34Z","messageCount":2,"participants":["Daniel Ducharme","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"485546","messageId":"DS7PR13MB46861D9FF40E2A340FD2C8D2CF8FA@DS7PR13MB4686.namprd13.prod.outlook.com","threadId":"60602","inReplyTo":null,"subject":"Bug in SVN.pm","fromName":"Daniel Ducharme","fromEmail":"dducharme@catalisgov.com","sentAt":"2023-12-11T22:51:48Z","receivedAt":"2023-12-11T22:51:53Z","isPatch":false,"sender":{"key":"dducharme@catalisgov.com","avatar":null},"body":"Good afternoon,\n\nNot sure if this is maintained as part of GIT, but the bug is located in the file: C:\\Program Files\\Git\\mingw64\\share\\perl5\\Git\\SVN.pm\n\nsub parse_svn_date requires both the month, day, hour, and minute to be 2 digits long and fails on 2007-3-12T17:46:4.000000Z as an example due to the regex. Suggestion is to make the regex instead /^(\\d{4})\\-(\\d\\d?)\\-(\\d\\d?)T (\\d\\d?)\\:(\\d\\d?)\\:(\\d\\d?)\\.\\d*Z$/x)\n\nI have found this data to be present in a SVN repository converted off of VSS while trying to take some old VSS repos to git through SVN, not sure if standard SVN would have allowed these date patterns, but they should be valid. The above regex also contains a fix for single digit minute and second as I also ran into that as well.\n\nI have fixed my local copy so I am good for my project, but it took me a couple of hours to find and fix and figured this may help someone else so I wanted to get it reported. I am on git version 2.43.0.windows.1.\n\nDaniel   Ducharme, Ph.D., RICA l  Director of Software Development\nCatalis Tax and CAMA, Inc.\nO: 781.476.2012\nM: 401.743.5853\nE: dducharme@catalisgov.com\n catalisgov.com\n\n\n \n\n"},{"id":"485555","messageId":"xmqqo7ewtcu8.fsf@gitster.g","threadId":"60602","inReplyTo":"DS7PR13MB46861D9FF40E2A340FD2C8D2CF8FA@DS7PR13MB4686.namprd13.prod.outlook.com","subject":"Re: Bug in SVN.pm","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2023-12-12T01:43:27Z","receivedAt":"2023-12-12T01:43:34Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Daniel Ducharme <dducharme@catalisgov.com> writes:\n\n> sub parse_svn_date requires both the month, day, hour, and minute\n> to be 2 digits long and fails on 2007-3-12T17:46:4.000000Z as an\n> example due to the regex. Suggestion is to make the regex instead\n> /^(\\d{4})\\-(\\d\\d?)\\-(\\d\\d?)T (\\d\\d?)\\:(\\d\\d?)\\:(\\d\\d?)\\.\\d*Z$/x)\n>\n> I have found this data to be present in a SVN repository converted\n> off of VSS while trying to take some old VSS repos to git through\n> SVN, not sure if standard SVN would have allowed these date\n> patterns, but they should be valid. The above regex also contains\n> a fix for single digit minute and second as I also ran into that\n> as well.\n\nI do not think it is fair to call this a bug in SVN.pm, provided if\nSVN wants to use ISO 8601 datetime format for its timestamps.  ISO\n8601, IIUC, is fairly clear that month and day must be two-digit\nstrings, 0-filled to the left as needed, and I would not be\nsurprised if standard SVN rejected such bogus dates, and I do not\nagree with your \"they *SHOULD* be valid\" statement.\n\nHaving said all that, it is good to be liberal in what we accept,\nand I am sympathetic to \"it would be nicer if they were accepted\"\nsentiment.  As long as there is no ambiguity, I would say that it\nwould be nicer if timestamps like \"2007-3-12T17:1:2.0Z\" were\naccepted, and I would not be fundamentally opposed to a patch that\nloosens the regex to do so.\n\nPatches welcome ;-).\n"}]}