Skip to content

Conversation

stefanhaller
Copy link
Collaborator

@stefanhaller stefanhaller commented Mar 1, 2025

  • PR Description

If files at the root level of the repository have changed, there was no way to see the combined diff of all of them. Fix this by inserting a / item in this case. This is useful in repositories such as git.git, which have all their .c files at root level (gasp).

If only files inside some folder have changed, the root item gets compressed away automatically, so nothing changes for that case (which I guess should be more common for most people).

Addresses #4331.

  • Please check if the PR fulfills these requirements
  • Cheatsheets are up-to-date (run go generate ./...)
  • Code has been formatted (see here)
  • Tests have been added/updated (see here for the integration test guide)
  • Text is internationalised (see here)
  • If a new UserConfig entry was added, make sure it can be hot-reloaded (see here)
  • Docs have been updated if necessary
  • You've read through your own file changes for silly mistakes etc

@ratorx
Copy link

ratorx commented Mar 2, 2025

Can confirm this is working well for me (have no opinions about implementation :))

It solves part of my problem, but I'll put more details about that in the discussion.

@stefanhaller stefanhaller force-pushed the Add-root-node-in-file-tree branch from b5db34b to 36e48b0 Compare March 2, 2025 12:19
@stefanhaller
Copy link
Collaborator Author

I'm reasonably happy with the implementation now, and I cleaned up the commit history to make it reviewable. The distinction between GetPath and GetInternalPath might be a bit brittle and error-prone (easy to use the wrong one), but it's well-documented and the most reasonable solution I could think of. Let me know if you have any better ideas.

I wouldn't want to go about adapting all the tests (lots of them) before we have agreement about how the root item should look. Right now it's <root>, but does that look too ugly? Should it be just root? And does it have to be i18n-ized? I also considered making it just ., but maybe that's too subtle. But it would conceptually make sense; pressing space on it to stage all files would be equivalent to git add . on the command line.

@jesseduffield
Copy link
Owner

As discussed let's go with '/' for the root

@stefanhaller stefanhaller force-pushed the Add-root-node-in-file-tree branch from 36e48b0 to 99e56d8 Compare March 6, 2025 10:06
@stefanhaller
Copy link
Collaborator Author

As discussed let's go with '/' for the root

Ok, force-pushed with that change if you want to try it more. Still no progress on adapting the tests, will do that on the weekend, probably.

@jesseduffield
Copy link
Owner

Thanks, will do

@jesseduffield
Copy link
Owner

Funnily enough I just hit an index.lock error when staging all files via the root file. It appears this is not in fact equivalent to pressing 'a', and I wonder if we should just use an explicit git add . (or whatever we do when we press 'a') upon pressing space on the root file. It's possible that index.lock error was just a freak accident, but I also assume there's a performance difference between the two approaches.

@stefanhaller
Copy link
Collaborator Author

I do think the index.lock error is unrelated. I also get this (very occasionally) when hitting space on non-root items.

The difference between space on the root item and a is git add -- . for the former, and git add -A for the latter. I have to read up on what difference the -A makes, but when hitting space on a subfolder we also use git add -- <path>, so I don't see why it should be any different at the root.

@jesseduffield
Copy link
Owner

Oh okay, good to know. Happy to consider it a coincidence.

@stefanhaller stefanhaller force-pushed the Add-root-node-in-file-tree branch from 99e56d8 to 5446b3b Compare March 12, 2025 07:42
@stefanhaller stefanhaller added the enhancement New feature or request label Mar 12, 2025
@stefanhaller stefanhaller marked this pull request as ready for review March 12, 2025 07:43
@stefanhaller stefanhaller force-pushed the Add-root-node-in-file-tree branch from 5446b3b to 98193df Compare March 12, 2025 07:49
@stefanhaller
Copy link
Collaborator Author

This is ready for review. I adapted the tests in separate commits for easier review, but these will have to be squashed into the commit that changes the behavior.

Copy link

codacy-production bot commented Mar 12, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
Report missing for e8d3a7a1 97.35%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (e8d3a7a) Report Missing Report Missing Report Missing
Head commit (2645952) 53486 46334 86.63%

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#4346) 565 550 97.35%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

Footnotes

  1. Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

@stefanhaller stefanhaller force-pushed the Add-root-node-in-file-tree branch from 98193df to 6b8e1fc Compare March 17, 2025 19:45
Copy link
Owner

@jesseduffield jesseduffield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good but after our recent convo relating to not soliciting feedback from enough people, I'm interested in knowing: if users don't like this change, how easy will be it be to make it opt-out (or opt-in if the backlash is sufficiently great)

I'm pretty sure that the check for the main view was meant to be done with the
commit selected in the commits panel, not with the first file of the commit
files view selected, so it was pressing enter too early. It's pure coincidence
that the test worked.
Assert the entire lines using Equals instead of Contains. This makes the tests a
bit easier to read, and it makes it much easier to decide how they need to be
changed when we change the layout (like we do in the last commit of this
branch).

It is true that this requires changing all these tests for any future UI
changes, but I think this is a good price to pay; those adaptions are trivial
and can be done without thinking.
Name was very confusing and misleading.
In preparation of making it private to the package.
This is in preparation for changing the meaning of path in the next commit.
@stefanhaller
Copy link
Collaborator Author

if users don't like this change, how easy will be it be to make it opt-out (or opt-in if the backlash is sufficiently great)

Not very hard; it would take a change roughly like this:

diff --git i/pkg/gui/filetree/build_tree.go w/pkg/gui/filetree/build_tree.go
index 1168b1a3d..e31164d13 100644
--- i/pkg/gui/filetree/build_tree.go
+++ w/pkg/gui/filetree/build_tree.go
@@ -7,14 +7,19 @@ import (
 	"github.com/jesseduffield/lazygit/pkg/commands/models"
 )
 
-func BuildTreeFromFiles(files []*models.File) *Node[models.File] {
+func BuildTreeFromFiles(files []*models.File, showRootNode bool) *Node[models.File] {
 	root := &Node[models.File]{}
 
 	childrenMapsByNode := make(map[*Node[models.File]]map[string]*Node[models.File])
 
 	var curr *Node[models.File]
 	for _, file := range files {
-		splitPath := split("./" + file.Path)
+		var splitPath []string
+		if showRootNode {
+			splitPath = split("./" + file.Path)
+		} else {
+			splitPath = split(file.Path)
+		}
 		curr = root
 	outer:
 		for i := range splitPath {
@@ -40,7 +45,7 @@ func BuildTreeFromFiles(files []*models.File) *Node[models.File] {
 				continue outer
 			}
 
-			if i == 0 && len(files) == 1 && len(splitPath) == 2 {
+			if showRootNode && i == 0 && len(files) == 1 && len(splitPath) == 2 {
 				// skip the root item when there's only one file at top level; we don't need it in that case
 				continue outer
 			}
@@ -70,12 +75,17 @@ func BuildFlatTreeFromCommitFiles(files []*models.CommitFile) *Node[models.Commi
 	return &Node[models.CommitFile]{Children: sortedFiles}
 }
 
-func BuildTreeFromCommitFiles(files []*models.CommitFile) *Node[models.CommitFile] {
+func BuildTreeFromCommitFiles(files []*models.CommitFile, showRootNode bool) *Node[models.CommitFile] {
 	root := &Node[models.CommitFile]{}
 
 	var curr *Node[models.CommitFile]
 	for _, file := range files {
-		splitPath := split("./" + file.Path)
+		var splitPath []string
+		if showRootNode {
+			splitPath = split("./" + file.Path)
+		} else {
+			splitPath = split(file.Path)
+		}
 		curr = root
 	outer:
 		for i := range splitPath {
@@ -94,7 +104,7 @@ func BuildTreeFromCommitFiles(files []*models.CommitFile) *Node[models.CommitFil
 				}
 			}
 
-			if i == 0 && len(files) == 1 && len(splitPath) == 2 {
+			if showRootNode && i == 0 && len(files) == 1 && len(splitPath) == 2 {
 				// skip the root item when there's only one file at top level; we don't need it in that case
 				continue outer
 			}

I'm personally pretty convinced they will like it though. 😄

@stefanhaller stefanhaller force-pushed the Add-root-node-in-file-tree branch from 6b8e1fc to 14f464c Compare March 20, 2025 13:43
@jesseduffield
Copy link
Owner

It's good to know it's not a big change to support that. I actually think in this case we should make it opt-out. That will mean that if people don't like it, there's a way out. I can imagine the extra keypress required to select a file (in the event where multiple top-level files/folders have changed) will annoy some people

@stefanhaller
Copy link
Collaborator Author

I actually think in this case we should make it opt-out.

I'm happy to add the config as soon as the first user complains, but I don't think we should add it proactively. I still believe there's a lot of value in keeping our config tidy and avoiding to add options that nobody uses. It's hard to know for sure, but I'd be very surprised if anybody will want to turn it off.

I can imagine the extra keypress required to select a file (in the event where multiple top-level files/folders have changed) will annoy some people

But the ability to see the combined diff of all files (which isn't possible at all right now) so outweighs this.

@jesseduffield
Copy link
Owner

Alright let's ship it and see what happens

@stefanhaller stefanhaller force-pushed the Add-root-node-in-file-tree branch from 14f464c to 2645952 Compare March 21, 2025 07:05
@stefanhaller stefanhaller enabled auto-merge March 21, 2025 07:06
@stefanhaller stefanhaller merged commit 1107462 into master Mar 21, 2025
15 checks passed
@stefanhaller stefanhaller deleted the Add-root-node-in-file-tree branch March 21, 2025 07:08
stefanhaller added a commit that referenced this pull request Apr 2, 2025
This broke with #4346 (Add root node in file tree).
stefanhaller added a commit that referenced this pull request Apr 8, 2025
- **PR Description**

Fix a regression (introduced with the root item PR, #4346) that caused
renamed files to be displayed with their full path in tree view.

While fixing this I noticed that the display of moved files is a bit
confusing; for example, you can't distinguish a file being moved from
the root level into a directory from one that was renamed inside the
directory; see commit message of the first commit for more. I'm not
doing anything about this right now, just fix the regression for now.

Labeled as "ignore-for-release" because it fixes a regression in code
that wasn't released yet.

- **Please check if the PR fulfills these requirements**

* [x] Cheatsheets are up-to-date (run `go generate ./...`)
* [x] Code has been formatted (see
[here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#code-formatting))
* [x] Tests have been added/updated (see
[here](https://github.com/jesseduffield/lazygit/blob/master/pkg/integration/README.md)
for the integration test guide)
* [ ] Text is internationalised (see
[here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#internationalisation))
* [ ] If a new UserConfig entry was added, make sure it can be
hot-reloaded (see
[here](https://github.com/jesseduffield/lazygit/blob/master/docs/dev/Codebase_Guide.md#using-userconfig))
* [ ] Docs have been updated if necessary
* [x] You've read through your own file changes for silly mistakes etc
@BijanRegmi
Copy link

is there any config to disable this?

@stefanhaller
Copy link
Collaborator Author

is there any config to disable this?

No, we discussed this above and decided to add one only once people complain.

So is your question a complaint? 😉

Seriously, can you explain why you are looking to turn this off?

@Zeglius
Copy link

Zeglius commented Apr 22, 2025

Hi, I don't know if it's related, but now the unstaged changes panel doesn't show the diff of all the changes in the repo whenever the root node is selected, only can see changes per file if I select, or if I stage all the changes.

It is a bit of an annoyance, before it was fine and could have an overview of all the changes in, though I'm assuming this could be fixed without having to toggle off this root node thing? If so feel free to open a new issue (or just ping me so I open one myself).

Btw thank you all, I don't think I could have enjoyed git as much without lazygit ❤️

@Zeglius
Copy link

Zeglius commented Apr 22, 2025

Hi, I don't know if it's related, but now the unstaged changes panel doesn't show the diff of all the changes in the repo whenever the root node is selected, only can see changes per file if I select, or if I stage all the changes.

It is a bit of an annoyance, before it was fine and could have an overview of all the changes in, though I'm assuming this could be fixed without having to toggle off this root node thing? If so feel free to open a new issue (or just ping me so I open one myself).

Btw thank you all, I don't think I could have enjoyed git as much without lazygit ❤️

Actually nvm ignore this, dumbass of me didn't commit the files, it does show up an overview of all the changes, my bad 😅

@stefanhaller
Copy link
Collaborator Author

@Zeglius Good. 😄

@BijanRegmi Any input from you?

@gwennlbh
Copy link

gwennlbh commented Apr 25, 2025

it's a bit weird to me because it basically sacrifices an entire identation level for something that can be achieved with 'a'

count me in as a vote to make in opt-out-able, but it's not that big of a deal honestly ^^

tbh: i was confused at first lol, I had changed stuff in the project's .vscode/ and i thought that lazygit had somehow found a .vsode/ at the root of my filesystem lmao

@stefanhaller
Copy link
Collaborator Author

sacrifices an entire indentation level

That's an interesting aspect that I hadn't considered. It doesn't bother me personally, but I can see how it could be a problem for people using very long file names, and/or having a small terminal window.

for something that can be achieved with 'a'

That's not the main reason why we added it; I agree that a is perfectly adequate for that, and I use it more often than pressing space on the root item. The real reason is so that you can see the whole diff of all your changed files at once.

@rizkyilhampra
Copy link

Hi. I was also looking for a way to turn off this behavior, but after reading the point about “being able to see the full diff of all changed files at once,” I think I’ll try to get used to it. Thanks, that makes sense now

tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request May 10, 2025
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [jesseduffield/lazygit](https://github.com/jesseduffield/lazygit) | minor | `v0.48.0` -> `v0.50.0` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>jesseduffield/lazygit (jesseduffield/lazygit)</summary>

### [`v0.50.0`](https://github.com/jesseduffield/lazygit/releases/tag/v0.50.0)

[Compare Source](jesseduffield/lazygit@v0.49.0...v0.50.0)

<!-- Release notes generated using configuration in .github/release.yml at v0.50.0 -->

#### What's Changed

##### Enhancements 🔥

-   Continue/abort a conflicted cherry-pick or revert by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4441
-   Show todo items for pending cherry-picks and reverts by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4442
-   Use "git cherry-pick" for implementing copy/paste of commits by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4443
-   Allow reverting a range of commits by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4444
-   Section headers for rebase todos and actual commits by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4463
-   Focus the main view by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4429
-   Auto-forward main branches after fetching by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4493
-   Add new command "Move commits to new branch" by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#3876
-   Strip the '+' and '-' characters when copying parts of a diff to the clipboard by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4519
-   Reduce memory consumption of graph (pipe sets) by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4498

##### Fixes 🔧

-   Fix truncation of branches when scrolling branches panel to the left by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4483
-   Fix nvim-remote commands for fish shell by [@&#8203;SavingFrame](https://github.com/SavingFrame) in jesseduffield/lazygit#4506
-   Disallow creating custom patches when the diff context size is 0 by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4522
-   Remove double space between rebase todo and author columns by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4520

##### Maintenance ⚙️

-   Allow closing issues via github actions by [@&#8203;jesseduffield](https://github.com/jesseduffield) in jesseduffield/lazygit#4515

##### Docs 📖

-   Add Debian installation instructions alongside Ubuntu by [@&#8203;jmkim](https://github.com/jmkim) in jesseduffield/lazygit#4501
-   fix wording of random tip by [@&#8203;dawedawe](https://github.com/dawedawe) in jesseduffield/lazygit#4488

#### New Contributors

-   [@&#8203;jmkim](https://github.com/jmkim) made their first contribution in jesseduffield/lazygit#4501
-   [@&#8203;SavingFrame](https://github.com/SavingFrame) made their first contribution in jesseduffield/lazygit#4506
-   [@&#8203;dawedawe](https://github.com/dawedawe) made their first contribution in jesseduffield/lazygit#4488

**Full Changelog**: jesseduffield/lazygit@v0.49.0...v0.50.0

### [`v0.49.0`](https://github.com/jesseduffield/lazygit/releases/tag/v0.49.0)

[Compare Source](jesseduffield/lazygit@v0.48.0...v0.49.0)

<!-- Release notes generated using configuration in .github/release.yml at v0.49.0 -->

#### What's Changed

##### Enhancements 🔥

-   Support fish when running shell command by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4350
-   Add acme editor preset by [@&#8203;rakoo](https://github.com/rakoo) in jesseduffield/lazygit#4360
-   Support home and end as alternatives to '<' and '>' by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4396
-   Drop the git config cache when getting focus by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4376
-   Add a "Content of selected file" entry to the copy menu for commit files by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4341
-   Add root node in file tree by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4346
-   \[FEAT] Add Recursive Bulk Initialize and Update for Submodules by [@&#8203;cesarandr](https://github.com/cesarandr) in jesseduffield/lazygit#4259
-   Commit without pre-commit hooks action is independent on prefix by [@&#8203;kschweiger](https://github.com/kschweiger) in jesseduffield/lazygit#4374
-   Let users define custom icons and color for files on the config file by [@&#8203;hasecilu](https://github.com/hasecilu) in jesseduffield/lazygit#4395
-   Add "Absolute path" item to the file view's copy menu by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4410
-   Allow range drop stashes by [@&#8203;gaogao-qwq](https://github.com/gaogao-qwq) in jesseduffield/lazygit#4451
-   More navigation keybindings for confirmation panel by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4404
-   Resolve non-inline merge conflicts by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4431
-   Add `runCommand` function to Go template syntax + add support for templates in git `branchPrefix` setting by [@&#8203;ruudk](https://github.com/ruudk) in jesseduffield/lazygit#4438
-   Show "(hooks disabled)" in title bar of commit message editor by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4467
-   Add a command to select all commits of the current branch by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4448

##### Fixes 🔧

-   Use a waiting status for rewording a non-head commit by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4343
-   Fix layout of options view for non-english languages by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4359
-   Fix changing language while lazygit is running by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4361
-   URL encode gitlab brackets to make consistent with branch names by [@&#8203;ChrisMcD1](https://github.com/ChrisMcD1) in jesseduffield/lazygit#4336
-   Fix commitPrefix setting with empty pattern by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4381
-   Commit only tracked files in tracked filter view by [@&#8203;parthokunda](https://github.com/parthokunda) in jesseduffield/lazygit#4386
-   Revert [#&#8203;4313](jesseduffield/lazygit#4313) (Skip post-checkout hook when discarding changes) by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4407
-   Enhance support for GPG signed tags by [@&#8203;ChrisMcD1](https://github.com/ChrisMcD1) in jesseduffield/lazygit#4394
-   Fix checking out a file from a range selection of commits by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4423
-   Fix discarding submodule changes in nested folders by [@&#8203;brandondong](https://github.com/brandondong) in jesseduffield/lazygit#4317
-   Better support for shell aliases by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4385
-   Fix hyperlinks in last line of confirmation popups by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4454
-   Fix wrong main view content after pressing `e` in a stack of branches by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4450
-   fix: update vscode color to logo color by [@&#8203;PeterCardenas](https://github.com/PeterCardenas) in jesseduffield/lazygit#4459
-   Fix crash with drag selecting and staging by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4480
-   Escape special characters in filenames when git-ignoring files by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4475

##### Maintenance ⚙️

-   Fix linter warnings by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4352
-   Fix release schedule again by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4364
-   Update to go 1.24 by [@&#8203;radsaq](https://github.com/radsaq) in jesseduffield/lazygit#4377
-   Add an integration test for a config with a negative refspec by [@&#8203;radsaq](https://github.com/radsaq) in jesseduffield/lazygit#4382
-   Specify a go release minor version by [@&#8203;radsaq](https://github.com/radsaq) in jesseduffield/lazygit#4393
-   Fix flaky integration test by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4432
-   Some code cleanup by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4449
-   Bump the minimum required git version to 2.22 by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4439
-   Bump go-git, and get rid of github.com/imdario/mergo by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4460
-   Skip date check when release worfklow is manually invoked by [@&#8203;jesseduffield](https://github.com/jesseduffield) in jesseduffield/lazygit#4484

##### Docs 📖

-   Include empty arrays and maps in config docs by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4413
-   Filter out deprecated user config fields from generated Config.md by [@&#8203;karimkhaleel](https://github.com/karimkhaleel) in jesseduffield/lazygit#4416
-   Corrected interactive rebase keybind example in README.md by [@&#8203;NewtonChutney](https://github.com/NewtonChutney) in jesseduffield/lazygit#4426
-   Update kidpix link in README to active url by [@&#8203;ChrisMcD1](https://github.com/ChrisMcD1) in jesseduffield/lazygit#4425

##### I18n 🌎

-   Update translation files from Crowdin by [@&#8203;stefanhaller](https://github.com/stefanhaller) in jesseduffield/lazygit#4473

#### New Contributors

-   [@&#8203;rakoo](https://github.com/rakoo) made their first contribution in jesseduffield/lazygit#4360
-   [@&#8203;radsaq](https://github.com/radsaq) made their first contribution in jesseduffield/lazygit#4377
-   [@&#8203;cesarandr](https://github.com/cesarandr) made their first contribution in jesseduffield/lazygit#4259
-   [@&#8203;kschweiger](https://github.com/kschweiger) made their first contribution in jesseduffield/lazygit#4374
-   [@&#8203;NewtonChutney](https://github.com/NewtonChutney) made their first contribution in jesseduffield/lazygit#4426
-   [@&#8203;gaogao-qwq](https://github.com/gaogao-qwq) made their first contribution in jesseduffield/lazygit#4451
-   [@&#8203;ruudk](https://github.com/ruudk) made their first contribution in jesseduffield/lazygit#4438

**Full Changelog**: jesseduffield/lazygit@v0.48.0...v0.49.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MC4xMS4yIiwidXBkYXRlZEluVmVyIjoiNDAuMTEuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90Il19-->
stefanhaller added a commit that referenced this pull request May 26, 2025
- **PR Description**

In #4346 we added a `/` root item in the Files and CommitFiles panels
whenever there is more than one top-level item. We made it
unconditional, but I promised to add a config as soon as users ask for
being able to disable it. For a while I was able to convince users who
asked for it that it is useful and they don't want to turn it off, but
now there's a [stronger
request](#4590 (reply in thread))
from someone who refuses to upgrade to the current version, and we don't
want that.

So, add a config option `gui.showRootItemInFileTree` that is true by
default.
@Dsaquel
Copy link

Dsaquel commented Jun 25, 2025

Thanks for this great feature 😀.

I think it would be nice having the the root node name configurable.

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants