{"thread":{"id":"50868","subject":"[GSoC] [RFC] Unify ref-filter formats with other --pretty formats","startedAt":"2019-04-03T19:54:16Z","lastAt":"2019-04-04T12:11:08Z","messageCount":2,"participants":["Kapil Jain","Olga Telezhnaya"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"373068","messageId":"CAMknYEPzUpa3c9PSfJNo6rzUOt-bDUDYrcn9JcHgSGW43KuRYg@mail.gmail.com","threadId":"50868","inReplyTo":null,"subject":"[GSoC] [RFC] Unify ref-filter formats with other --pretty formats","fromName":"Kapil Jain","fromEmail":"jkapil.cs@gmail.com","sentAt":"2019-04-03T19:54:02Z","receivedAt":"2019-04-03T19:54:16Z","isPatch":false,"sender":{"key":"jkapil.cs@gmail.com","avatar":null},"body":"Reference: https://git.github.io/SoC-2019-Ideas/#unify-ref-filter-formats-with-other---pretty-formats\n\nI have spent some time with both pretty.* and ref-filter.*\n\nFirst off, we are aiming to reuse ref-filter, so avoiding any sort of\nre-implementation is recommended.\n\nNow, coming to pretty.* and ref-filter.*\n\nsuppose, a function named xyz() in ref-filter.c seems like it could be\nreused in pretty.c.\nsince ref-filter doesn't use any struct of pretty.c. The xyz()\nfunction in its original form is not useful for pretty.c.\nSo now, in order for the xyz() function to be useful in pretty.c.\nFunction xyz() should be using structs of pretty.*\n\nnow, if we make xyz() use the pretty.* structs, then its\nre-implementation and not reusing. its like keeping two different\nfunctions one for ref-filter and another for pretty.*.\nwhich is what is already happening.\n\nplease provide any starting point for reusing ref-filter. i don't see\nany in pretty.*.\nreusing ref-filter specifically in pretty.* is not the motive. please\npoint out any file in entire code base, that you may feel can reuse\nsome ref-filter logic.\n"},{"id":"373115","messageId":"CAL21Bmnm0Pk9mHzetSx0_GDcUc0SJZ5giWoFUdTMLCZ+KutEVQ@mail.gmail.com","threadId":"50868","inReplyTo":"CAMknYEPzUpa3c9PSfJNo6rzUOt-bDUDYrcn9JcHgSGW43KuRYg@mail.gmail.com","subject":"Re: [GSoC] [RFC] Unify ref-filter formats with other --pretty formats","fromName":"Olga Telezhnaya","fromEmail":"olyatelezhnaya@gmail.com","sentAt":"2019-04-04T12:02:33Z","receivedAt":"2019-04-04T12:11:08Z","isPatch":false,"sender":{"key":"olyatelezhnaya@gmail.com","avatar":"https://avatars.githubusercontent.com/u/11246099?v=4"},"body":"ср, 3 апр. 2019 г. в 22:54, Kapil Jain <jkapil.cs@gmail.com>:\n>\n> Reference: https://git.github.io/SoC-2019-Ideas/#unify-ref-filter-formats-with-other---pretty-formats\n>\n> I have spent some time with both pretty.* and ref-filter.*\n>\n> First off, we are aiming to reuse ref-filter, so avoiding any sort of\n> re-implementation is recommended.\n\nIt is recommended, but it's normal situation to re-implement something\nas a middle step.\n\n>\n> Now, coming to pretty.* and ref-filter.*\n>\n> suppose, a function named xyz() in ref-filter.c seems like it could be\n> reused in pretty.c.\n> since ref-filter doesn't use any struct of pretty.c. The xyz()\n> function in its original form is not useful for pretty.c.\n> So now, in order for the xyz() function to be useful in pretty.c.\n> Function xyz() should be using structs of pretty.*\n>\n> now, if we make xyz() use the pretty.* structs, then its\n> re-implementation and not reusing. its like keeping two different\n> functions one for ref-filter and another for pretty.*.\n> which is what is already happening.\n\nIt's OK as the middle step. Another approach is to add using\nref-filter structures and continue using existing ones, so that you\nhave 2 duplicating flows of data. Reuse ref-filter logic, and then in\nthe end of the patch delete duplicating logic from pretty. Both these\napproaches could be useful, choose any of them or design your own way.\nI deleted so much code that I wrote, I advice you try not to afraid of\nit. It's OK to make something and then rewrite it several times. The\nonly thing that matters is the final result.\n\n>\n> please provide any starting point for reusing ref-filter. i don't see\n> any in pretty.*.\n> reusing ref-filter specifically in pretty.* is not the motive. please\n> point out any file in entire code base, that you may feel can reuse\n> some ref-filter logic.\n"}]}