{"thread":{"id":"50745","subject":"[GSoC] Microproject: Add more builtin patterns for userdiff","startedAt":"2019-03-15T09:09:38Z","lastAt":"2019-03-15T12:56:13Z","messageCount":2,"participants":["Kapil Jain","Ævar Arnfjörð Bjarmason"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"371570","messageId":"CAMknYEMgJ88zWsebxBqsLq8LUwYzg0vN3RpsWVpbqvncrd5dGQ@mail.gmail.com","threadId":"50745","inReplyTo":null,"subject":"[GSoC] Microproject: Add more builtin patterns for userdiff","fromName":"Kapil Jain","fromEmail":"jkapil.cs@gmail.com","sentAt":"2019-03-15T09:09:25Z","receivedAt":"2019-03-15T09:09:38Z","isPatch":false,"sender":{"key":"jkapil.cs@gmail.com","avatar":null},"body":"Hi,\n\nfor the microproject: creating diff function support for different languages.\ni wrote one for shell script, have tested it outside of git and it works fine.\n\nquery regarding accommodating the pattern in:\n1) userdiff.c, it uses - #define PATTERNS(name, pattern, word_regex),\nfor defining patterns to locate functions.\nwhat is the use of pattern and word_regex parameters ? i am guessing\nthat pattern parameter is the actual pattern to spot functions in a\nfile,\nand word_regex is used to get function name. is that correct ?\nplease let me know.\n"},{"id":"371584","messageId":"8736nob8k8.fsf@evledraar.gmail.com","threadId":"50745","inReplyTo":"CAMknYEMgJ88zWsebxBqsLq8LUwYzg0vN3RpsWVpbqvncrd5dGQ@mail.gmail.com","subject":"Re: [GSoC] Microproject: Add more builtin patterns for userdiff","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2019-03-15T12:56:07Z","receivedAt":"2019-03-15T12:56:13Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Fri, Mar 15 2019, Kapil Jain wrote:\n\n> Hi,\n>\n> for the microproject: creating diff function support for different languages.\n> i wrote one for shell script, have tested it outside of git and it works fine.\n>\n> query regarding accommodating the pattern in:\n> 1) userdiff.c, it uses - #define PATTERNS(name, pattern, word_regex),\n> for defining patterns to locate functions.\n> what is the use of pattern and word_regex parameters ? i am guessing\n> that pattern parameter is the actual pattern to spot functions in a\n> file,\n\nYes, except \"functions\". More like \"logical start of\nstuff\". E.g. \"package\" statements for Perl etc.\n\nSo whatever makes the most sense to put in the \"@\" context line for diff\nto give the user an idea of what \"function\" this is changing, in the\nloosest possible sense of \"function\".\n\n> and word_regex is used to get function name. is that correct ?\n> please let me know.\n\nNo, it's whatever counts as a \"token\" in the language for the purpose of\n\"diff --word-diff\". So it needs to match e.g. operators as one unit.\n"}]}