git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [GSoC] My Git Dev Blog - Week 3

From
Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Date
Jun 8, 2021, 17:55 UTC
Message-ID
<CA+ARAtpm9NHoyiW84tnuXwvh25_du3AQaan11Aciq0gz_8nSuQ@mail.gmail.com>
In-Reply-To
<CBC56A4C-2D47-4C96-9621-73BCB1119B90@gmail.com>
Hi Atharva,
On Tue, Jun 8, 2021 at 12:43 PM Atharva Raykar <raykar.ath@gmail.com> wrote:
Show 16 quoted lines
>
> On 08-Jun-2021, at 00:25, Kaartic Sivaraam <kaartic.sivaraam@gmail.com> wrote:
> >
> >> My not-so-well-read guess: Some users want certain submodules
> >> active in one worktree, but not the other. For that, there
> >> presumably exists a per-worktree configuration, and the current
> >> implementation just assumes a configuration that applies to the
> >> full repo. Changing this is definitely a patch for some other time.
> >
> > I get to the same presumption. You could try exploring worktrees more to
> > confirm as you point out. You could also try Cc-ing people who you think
> > would have an idea of this. 'git blame' could you here.
>
> Yes, I have actually been noting down these "leftover bits" as
> things to look into after my GSoC period.
>
Good idea.
Show 11 quoted lines
> > > A painful merge
> >
> > You don't mention which branches you were trying to merge but
> > from the context I sort of figured out it was the
> > 'submodule-add-in-c-add-config-v2' and
> > 'submodule-add-in-c-add-clone-v3' branches in your repository: https://github.com/tfidfwastaken/git/
>
> That is correct. I felt like adding too many details like that
> might make it harder for someone to get the big picture about
> what happened at a later time (like one year from now).
>

That's fine. Just a suggestion, you could try balancing big-picture-view and detailed-view by mentioning additional details like this in a footnote.

Show 8 quoted lines
> > Also, which version of Git did you use to do the merge ?
>
> 2.31.1
>
> Since I'm now a Git developer, I should probably be running
> on a more bleeding edge version, but I have still not got
> around to it.
>

2.31.1 sounds very recent. But yeah, you could certainly try writing a cron job of sorts that automatically fetches `next` daily, builds and then installs it ;-)

Show 8 quoted lines
> > I tried reproducing the merge and it's indeed interesting that
> > even '-Xpatience' didn't do the trick.
>
> Yeah. It looks deceptively straightforward for the human eye,
> not so much for algorithms. Most likely because both the
> patches have structurally very similar code, and many lines in
> between are identical.
>
Yeah. That's very likely the cause.
Show 23 quoted lines
> >> I still wonder how non-Emacs users deal with situations like these.
> >
> > Git lets you invoke external merge tools which could help you resolve
> > merge conflicts in a easy way. See mergetool doc [1] to get an idea
> > about it. `git mergetool --tool-help` would give you a list of supported
> > tools. In your case, I happened to notice that P4Merge[2] does a good
> > job of properly resolving the conflict by itself.
> >
> > [1]: https://www.git-scm.com/docs/git-mergetool
> > [2]: https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge
>
> Thanks for the pointers. I currently use Ediff, which is what is
> the default mergetool that is invoked from Magit (the porcelain
> I use). Magit is great, Ediff not so much.
>
> > Speaking of resolving conflicts, there's also rerere [3] which should
> > save you from having to resolve the same conflict again and again.
>
> Yes. I had that enabled after learning about it from last week's
> discussion, that lead to it being the default in the next release.
>
> [https://lore.kernel.org/git/xmqqfsxvxjj2.fsf@gitster.g/]
>
That sounds like a good change.
Show 13 quoted lines
> > [3]: https://www.git-scm.com/book/en/v2/Git-Tools-Rerere
> >
> >> So I’m glad there’s the reflog.
> >
> > Now that you've learned about and used reflog, I thought I'll let you
> > know about `git fsck --lost-found` [4] in case it might come in handy
> > someday ;-)
> >
> > [4]: https://git-scm.com/docs/git-fsck#Documentation/git-fsck.txt---lost-found
>
> Thanks for showing me this. Looks very useful. I hope I never
> need it ;-)
>
:-)

BTW, I should've mentioned this earlier. Feel free to Cc me in any patch related to your submodule conversion project. I'll try to take a look and review as and when I find time.

-- 
Sivaraam
Previous: Atharva Raykar
Message 7 of 7 in “[GSoC] My Git Dev Blog - Week 3”
  1. Atharva RaykarJun 6, 2021
  2. Christian CouderJun 7, 2021
  3. Bagas SanjayaJun 7, 2021
  4. Atharva RaykarJun 7, 2021
  5. Kaartic SivaraamJun 7, 2021
  6. Atharva RaykarJun 8, 2021
  7. Kaartic SivaraamJun 8, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.