nvim-mini / nvim-mini/mini.nvim

[mini.diff] Add customization options to gen_source.git

Open
#2,200 17 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature-request mini.diff
Dominant language
Lua
Stars
9.5k
Forks
310
Avg merge
4h 16m
Merged PRs (30d)
1

Description

Contributing guidelines
Module(s)

mini.diff

Description

My use case is fairly straight forward: I use yadm (Yet Another Dotfiles Manager), and I want mini.diff to work reliably.

yadm is essentially a wrapper around git where the repo directory and the work directory differ.

Currently, I'm doing a copy and paste of all of the git functionality from mini.diff to create a yadm source, and replacing all of the references to git with yadm, but that's a pain to maintain, and really, it should be unnecessary.

The only thing that I need to be able to customize is the git command itself, though, if I were implementing this as a general thing, I'd add the ability to add custom arguments to all command runs as well.

Ideally, I would be able to do something like:

      source = {
        MiniDiff.gen_source.git(),
        MiniDiff.gen_source.git({git_cmd = "yadm"}),
        MiniDiff.gen_source.save(),
      },

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the mini.diff module's MiniDiff.gen_source.git implementation and trace how it constructs each git command. Determine how the requested git_cmd option should apply while preserving the existing default behavior. Done means yadm can use the same source functionality without copying the git implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, lua
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.