The Wayback Machine - https://web.archive.org/web/20220126084959/https://github.com/jesseduffield/lazygit/issues/1722
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename should not show diff as file being added #1722

Open
sdegutis opened this issue Jan 25, 2022 · 1 comment
Open

Rename should not show diff as file being added #1722

sdegutis opened this issue Jan 25, 2022 · 1 comment

Comments

@sdegutis
Copy link

@sdegutis sdegutis commented Jan 25, 2022

Renaming a file shows the staged changes diff as the entire file contents being added. It should do a diff of only what changed (if any) like git diff --cached does.

@jesseduffield
Copy link
Owner

@jesseduffield jesseduffield commented Jan 26, 2022

Makes sense, I've added a good-first-issue label. Relevant place to update the code is in the filesRenderToMain function in pkg/gui/files_panel.go. We need to be unconditionally setting refreshOpts.secondary to a value (even if it's rendering nothing) if a user config value is set that says we should always show staged and unstaged changes in separate panels.

We could call the user config 'SplitDiff' with 'always' and 'auto' as possible values. We can chuck it on GuiConfig in pkg/config/user_config.go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment