Commit graph

31 commits

Author SHA1 Message Date
Stefan Haller bae4d4c035 Show the containing directory instead of the full path in the recent repos menu
The third column of the recent repos menu spells out the full path of
each repo. That repeats the directory name which the first column
already shows, and it writes out the home directory in full. Both are
wasted width in a menu that is limited to 90 columns; the path column is
the first thing to run off the right edge, and users who don't know that
'L' scrolls the menu horizontally never see it at all.

Show the directory that contains the repo instead, with the home
directory abbreviated to '~'. For a list of 106 recent repos this takes
the column from 111 characters down to 97 at its longest, and from 47
down to 28 in the median.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-07 18:29:28 +02:00
Stefan Haller 7a67cea687 Expand a leading ~ in worktree paths to the home directory
Lazygit runs git directly rather than through a shell, so a literal "~"
reaches `git worktree add` unexpanded and git creates a directory named
"~" instead of using the home directory.

Expand the tilde ourselves, both for paths typed into the "Other"
location prompt and for the worktree.defaultPath config value.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-03 18:53:05 +02:00
Eng Zer Jun f933a2f7ec
Replace min/max helpers with built-in min/max
We upgraded our minimum Go version to 1.21 in commit
57ac9c2189. We can now replace our
`utils.Min` and `utils.Max` functions with the built-in `min` and `max`.

Reference: https://go.dev/ref/spec#Min_and_max
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2024-04-07 23:24:10 +08:00
Jesse Duffield 524bf83a4a refactor to only have one context per view 2022-08-06 13:49:11 +10:00
Jesse Duffield fb395bca6e support reverting merge commits 2021-06-05 22:15:51 +10:00
Jesse Duffield 258eedb38c refactor 2021-06-02 20:33:52 +10:00
Jesse Duffield e47ad846c4 big golangci-lint cleanup 2020-03-09 12:23:13 +11:00
Jesse Duffield f94d0be2c9 refactor the way we render lists 2020-02-25 21:21:07 +11:00
Jesse Duffield 2e1344f611 fix specs 2020-02-15 08:47:36 +11:00
Jesse Duffield 820f3d5cbb support split view in staging panel and staging ranges 2019-11-05 19:22:01 +11:00
Christian Muehlhaeuser 8f734b11e3 Removed unnecessary string conversion 2019-07-27 10:51:17 +10:00
Jesse Duffield ad93b4c863 consider whether the view has focus when rendering the contents of a view 2019-02-16 15:17:44 +11:00
Jesse Duffield cfe3605e6b use go-errors package to display stacktrace of errors that cause panics 2019-02-11 22:39:17 +11:00
Jesse Duffield ff856b7630 fetching branches without checking out 2018-12-08 11:51:47 +11:00
Jesse Duffield c0f9795910 staging lines and hunks 2018-12-05 19:33:46 +11:00
BlakeMScurr 181f91d2ef Add full stops to new comments. 2018-11-30 13:47:14 +13:00
BlakeMScurr 643cdd3461 Add simple comments to uncommented functions. 2018-11-30 11:04:08 +13:00
Jesse Duffield b9708c9f88 fix issues with commit message panel losing focus 2018-09-19 20:36:40 +10:00
Jesse Duffield 5a76b57952 one more spec to increase coverage 2018-09-19 19:31:29 +10:00
Jesse Duffield e95b2e5f0b update specs 2018-09-19 18:31:54 +10:00
Jesse Duffield 950cfeff6f add specs for menu utils 2018-09-19 18:19:26 +10:00
Jesse Duffield 3b765e5417 add test for min method 2018-09-12 19:39:36 +10:00
Jesse Duffield a9cd277070 add test for ResolvePlaceholderString 2018-09-03 19:31:27 +10:00
Tommy Nguyen 45fea83771
Convert \r\n to \n; don't depend on unix2dos 2018-08-20 09:16:35 -04:00
Tommy Nguyen 5dd049eb82
Convert test to use new library 2018-08-19 23:39:57 -04:00
Tommy Nguyen 108815c790
Add missing brace 2018-08-19 23:31:26 -04:00
remyabel 5c65066cbb
Merge branch 'master' into 157_remove_bom 2018-08-19 23:29:47 -04:00
Anthony HAMON fc126a1718 remove test 2018-08-19 21:39:23 +02:00
Tommy Nguyen 766197de9d
NormalizeLinefeeds removes rather than converts Window/Mac style lf's 2018-08-19 08:48:03 -04:00
Tommy Nguyen cea736e6e9
Factor out into NormalizeLinefeeds; add tests 2018-08-19 07:20:50 -04:00
Anthony HAMON f91b4067f4 add test to utils package 2018-08-19 10:37:03 +02:00