jesseduffield / jesseduffield/lazygit

Add a button, somewhere in C-p probably, to create a patch from outside of a submodule

Open
#6,012 2 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
82.4k
Forks
3k
Avg merge
2d 18h
Merged PRs (30d)
19

Description

### An inconvinience

I have cloned [boost repo](https://github.com/boostorg/boost).

I made a change for a lib.

I wanted to get a patch.

But there's a nuance: all libs in boost's repo are wrapped into submodules.

So, lazygit does not even allow to do patch for it, saying something like:

- Ctrl+P : "no patch created yet, stage plz"
- Space at submodule i.e. at staging outside of submodule: "repos can only stage submoduless' commits"

### current workaround

`git diff --submodule=diff`

### Additional context

`lazygit --version`
`commit=, build date=, build source=unknown, version=0.65.0, os=linux, arch=amd64, git version=2.55.0`

Contributor guide

Open the contributing guide

Research direction

Start at the Ctrl-P patch action and the staging behavior for submodules described in the issue. Compare those flows with the reported git diff --submodule=diff workaround; done means a user can create a patch for changes inside a submodule from the parent repository UI.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, go
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
66/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.