From: Christian Couder <firstname.lastname@example.org> To: Abhishek Kumar <email@example.com> Cc: git <firstname.lastname@example.org>, Johannes Schindelin <email@example.com> Subject: Re: [GSoC][RFC] Convert mergetool to builtin Date: Sun, 22 Mar 2020 12:27:06 +0100 Message-ID: <CAP8UFD0T4OXaTyVYhkG56Gko=qtUAA1bVfyKNbX05Xprwe__Bg@mail.gmail.com> (raw) In-Reply-To: <CAHk66fu7dZ4H8tvnbxfdBRcRdx-3f_cJSdVAoKrE3UbR3nehfA@mail.gmail.com> Hi Abhishek, On Wed, Mar 18, 2020 at 5:31 PM Abhishek Kumar <firstname.lastname@example.org> wrote: > > Hello Christian > > Sorry for the late reply - the work on the interval based graph labels has > been pretty chaotic. I am going to roll out the second version of this > proposal soon. Great! > In the meantime, > > > [...] > >> ### Conversion of mergetool--lib > >> > >> As mentioned earlier, conversion of the mergetool-related scripts has to be > >> spread over 2-3 SoC or similar projects due to the size of scripts involved. > >> Conversion of mergetool would set up most of the plumbing required for > >> mergetool--lib and makes the subsequent conversion possible. > > > > I wonder if it would be better to convert git-mergetool--lib.sh first > > and then git-difftool--helper.sh and git-mergetool.sh that are using > > it. > > I had been agonizing over this decision while I was initially writing > the proposal. > > My justifications for mergetool.sh over mergetool--lib.sh at the time were: [...] > As it stands now, I am open to converting either scripts. It's ok to give all the above arguments in your proposal, and then to say that you studied how to convert one of the possible scripts more and that's the reason you choose to convert it in your proposal. > >> ## Plan > >> > >> Similar to the conversion of difftool, I plan to create a builtin that shells > >> out to a helper script. Once mergetool--lib is converted, we can retire the > >> helper script and conversion would be complete. > > > > So you plan to create a builtin that would shell out to git-mergetool--lib.sh? > > > > Could you be clearer about what the conversion of difftool did and how > > you plan to imitate that? > > Conversion of difftool had three patches: > > 1. difftool: add a skeleton for the upcoming builtin > - Rename git-difftool.perl to git-legacy-difftool.perl > - Create builtin/difftool.c which executes git-legacy-difftool.perl > - Add difftool to builtin.h > - Add "difftool.usebuiltin" configuration option > - Modify build process > > 2. difftool: implement the functionality in the builtin > > 3. difftool: retire the legacy script > - Remove git-legacy-difftool.perl from the build process > - Remove outdated "NEEDWORK" comments > - Remove perl dependency from test file > > Since most of the conversion was done in a single commit, it is hard to talk > about the exact order of changes. It's ok to just say all the above in your proposal. > Similar to this, my changes can be grouped as: > > 1. Create a skeleton builtin. > 2. Implement scaffolding, implement shared functions, teach builtin to resolve > symlink, submodule and deleted file conflicts, and others. They form the core > functionality of mergetool. > 3. Teach builtin to shell out for file conflict (at which we retire > mergetool.sh) Ok, to group however you want. What I am just saying it's that's it's valuable if your proposal shows more clearly how your steps or the way you group the changes corresponds to what was done for difftool. > >> 8. Teach builtin to assign merge tool (July 10 - July 15) > >> - Convert `get_configured_merge_tool` from mergetool--lib > >> - Around 50 lines > > > > Ok, so at this point you start to convert git-mergetool--lib.sh. Where > > is the converted code going to be? Does git-difftool--helper.sh needs > > what you will convert? > > Yes. Some functions like get_configured_merge_tool, guess_merge_tool are only > used by mergetool and can be moved to builtin/mergetool.c. Ok. > >> 9. Teach builtin to shell out for file conflict (July 15 - July 31) > >> - Write a minimal mergetool--helper.sh (similar to difftool--helper.sh) > >> - Call the helper script from the builtin > >> - Retire the legacy script. > > > > Which legacy script? > > git-mergetool.sh was renamed to git-legacy-mergetool.sh back in first step. Ok. I hope to see the above answers in the next version of your proposal. Best, Christian.
next prev parent reply index Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-03-18 16:30 Abhishek Kumar 2020-03-19 8:42 ` Kaartic Sivaraam 2020-03-22 11:27 ` Christian Couder [this message] -- strict thread matches above, loose matches on Subject: below -- 2020-03-08 17:30 Abhishek Kumar 2020-03-12 1:15 ` Christian Couder
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to='CAP8UFD0T4OXaTyVYhkG56Gko=qtUAA1bVfyKNbX05Xprwe__Bg@mail.gmail.com' \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Mailing List Archive on lore.kernel.org Archives are clonable: git clone --mirror https://lore.kernel.org/git/0 git/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 git git/ https://lore.kernel.org/git \ email@example.com public-inbox-index git Example config snippet for mirrors Newsgroup available over NNTP: nntp://nntp.lore.kernel.org/org.kernel.vger.git AGPL code for this site: git clone https://public-inbox.org/public-inbox.git