Jesse Duffield
c92e687d3b
Fix focus issue when opening recent-repos menu at launch
...
I don't know why we were setting the initial context to CurrentSideContext
and not just CurrentContext in the first place. If there is no current context
in either case it'll default to the files context. So the only issue is if
we anticipated that some random context would be focused and we didn't want to
activate that. But I can't think of any situation where that would happen.
2023-06-07 18:27:18 +10:00
Jesse Duffield
e0ecc9e835
Allow global logging when developing
...
I'll be honest, for all I know logging should be global in general: it is
a pain to pass a logger to any struct that needs it. But smart people on the
internet tell me otherwise, and I do like the idea of not having any global
variables lying around.
Nonetheless, I often need to log things when locally debugging and that's a
different kind of logging than the kind you would include in the actual
released binary. For example if I want to log something from gocui, I would
rather not have gocui depend on lazygit's logging setup.
2023-05-25 18:31:32 +10:00
Jesse Duffield
63dc07fded
Construct arg vector manually rather than parse string
...
By constructing an arg vector manually, we no longer need to quote arguments
Mandate that args must be passed when building a command
Now you need to provide an args array when building a command.
There are a handful of places where we need to deal with a string,
such as with user-defined custom commands, and for those we now require
that at the callsite they use str.ToArgv to do that. I don't want
to provide a method out of the box for it because I want to discourage its
use.
For some reason we were invoking a command through a shell when amending a
commit, and I don't believe we needed to do that as there was nothing user-
supplied about the command. So I've switched to using a regular command out-
side the shell there
2023-05-23 19:49:19 +10:00
Jesse Duffield
5dacbb6293
merge master into refactor-better-encapsulation
2023-05-02 19:05:42 +10:00
Jesse Duffield
8edad826ca
Begin refactoring gui
...
This begins a big refactor of moving more code out of the Gui struct into contexts, controllers, and helpers. We also move some code into structs in the
gui package purely for the sake of better encapsulation
2023-04-30 13:19:52 +10:00
Jesse Duffield
711be78811
extract out function
2023-04-15 17:26:08 +10:00
AzraelSec
368f9c8cb3
feat: let interactive rebase prepend commands to the default todo file
2023-04-15 17:26:08 +10:00
Stefan Haller
bb856ad7c6
Bump minimum required git version to 2.20
...
We need this because the next commit is going to make use of the "break"
interactive rebase instruction, which was added in 2.20.
2023-02-19 10:20:14 +01:00
Ryooooooga
cd9111837e
feat: add GitVersion struct
2022-12-30 20:01:14 +09:00
Ryooooooga
41222f07ed
chore(gui): remove unused gitConfig
2022-12-30 20:01:14 +09:00
nitin mewar
526d02de1c
added gitVersion for version flag
...
Signed-off-by: nitin mewar <nitinmewar28@gmail.com>
2022-11-13 19:27:12 +05:30
nitin mewar
188890fc49
added gitVersion to version flag
...
Signed-off-by: nitin mewar <nitinmewar28@gmail.com>
2022-11-12 16:00:24 +05:30
Jesse Duffield
fd66499c8f
Merge pull request #2167 from xiaoliwang/remove_deprecated
2022-09-23 23:01:40 -07:00
jiepeng
b8900baf1a
remove deprecated calls
2022-09-17 15:10:41 -07:00
Luka Markušić
3232f46a8b
Validate --path argument when starting lazygit
2022-09-12 17:18:42 +02:00
nullishamy
956372cf8a
Run gofumpt
2022-08-18 18:26:34 +01:00
nullishamy
21a4522a51
Merge branch 'master' into feat/detect-bare-repo
2022-08-15 14:00:34 +01:00
nullishamy
154bd975a6
Apply refactoring suggestions
2022-08-15 13:59:34 +01:00
Jesse Duffield
4aea005f26
Merge pull request #2098 from Ryooooooga/feature/not-a-repository-quit
2022-08-14 17:37:07 +10:00
Jesse Duffield
304d74370e
refactor to ensure code doesn't depend on integration code
2022-08-13 13:56:50 +10:00
Jesse Duffield
ba96baee32
move code from main into app package to allow test to be injected
2022-08-13 13:55:08 +10:00
Jesse Duffield
d890238c7b
move input and assert into integration tests package
2022-08-13 13:52:13 +10:00
Jesse Duffield
46ae55f91e
introduce gui adapter
2022-08-13 13:51:56 +10:00
Ryooooooga
8b371ada73
feat(config): add notARepository: quit
2022-08-08 18:11:58 +09:00
nullishamy
0b4f9f8c76
Refactor branching logic
2022-08-01 21:58:00 +01:00
nullishamy
a658cd4076
Factor out opening of recent repos
2022-08-01 20:05:35 +01:00
nullishamy
69718fb557
Factor out redundant statement
2022-08-01 19:39:39 +01:00
nullishamy
b9b2f58bc8
Format, bug fixes
2022-08-01 17:41:20 +01:00
nullishamy
bdb0b9ae6e
Merge branch 'master' into feat/detect-bare-repo
2022-08-01 17:05:33 +01:00
nullishamy
2866827ca8
Apply suggestions from code review
2022-08-01 17:05:16 +01:00
Jesse Duffield
86ac309e08
add build info when building from source
2022-08-01 20:16:50 +10:00
nullishamy
9987e65c35
Merge branch 'master' into feat/detect-bare-repo
2022-08-01 03:14:49 +01:00
Luka Markušić
9c6239df3d
Worktrees should not be filtered out
...
But non-git directories should
2022-07-30 17:03:30 +02:00
nullishamy
41b54d742f
Check for bare repositories
2022-07-29 23:55:34 +01:00
Luka Markušić
f1efa02640
Ask for initial branch name
2022-06-30 13:53:58 +02:00
Jesse Duffield
32c0b39dbd
Merge pull request #1950 from HiromasaNojima/add_subcommand_into_specific_layout_directly
2022-06-11 11:51:14 +10:00
Jesse Duffield
b1e4968d0b
allow opening lazygit to a specific panel
2022-06-11 11:23:56 +10:00
Luka Markušić
a955dbcfd7
Validate recent repo before blindly opening it
2022-06-11 09:42:51 +10:00
Luka Markušić
658a6b239b
Fix parsing of 'y/n' when starting in non-repo
2022-06-11 09:42:51 +10:00
Jesse Duffield
499d51ecf6
Merge pull request #1931 from mark2185/fix-non-existant-recent-repo
2022-05-18 22:22:28 +10:00
Ryooooooga
9693afd671
fix: fix lint error
2022-05-18 20:34:35 +09:00
Luka Markušić
1de5ca3511
Don't panic when there are no valid git repos
2022-05-17 07:28:52 +02:00
Jesse Duffield
cd5b041b0f
clearer separation of concerns when bootstrapping application
2022-05-07 16:02:04 +10:00
Ryooooooga
86c259623c
feat: fix permission problem of temp dirs
2022-04-02 08:48:38 +11:00
Jesse Duffield
99e55725fb
simplify
2022-03-24 20:14:41 +11:00
Jesse Duffield
cb26c7a1f2
more things
2022-03-24 20:14:41 +11:00
Jesse Duffield
a34bdf1a04
update linters
2022-03-19 12:12:57 +11:00
Jesse Duffield
2a1e3faa0c
resetting controllers on new repo
2022-03-17 19:13:40 +11:00
David Roman
b8fc829f86
Record current directory on switch
2022-03-17 19:01:28 +11:00
Jesse Duffield
2436ff197a
fewer panics
2022-01-09 14:14:47 +11:00
Jesse Duffield
18f48a43d5
add some more linters
2022-01-09 14:09:53 +11:00
Jesse Duffield
364c5db19c
shorten name
2022-01-09 14:09:53 +11:00
Jesse Duffield
f503ff1ecb
start breaking up git struct
2022-01-09 14:09:53 +11:00
Jesse Duffield
95b2e9540a
update tests
2022-01-04 09:07:15 +11:00
Jesse Duffield
43a4fa970d
WIP
2022-01-04 09:07:15 +11:00
Jesse Duffield
192a548c99
refactoring the config struct
2022-01-04 09:07:15 +11:00
Jesse Duffield
18ab086126
introduce Common struct for passing around common stuff
2022-01-04 09:07:15 +11:00
Jesse Duffield
b4c078d565
WIP
2022-01-04 09:07:15 +11:00
Jesse Duffield
f704707d29
stream output from certain git commands in command log panel
2021-10-30 18:26:06 +11:00
Jesse Duffield
b6a5e9d615
use cached git config
2021-10-23 10:26:47 +11:00
black_desk
66d0fd2133
Format code to pass lint
2021-09-16 21:38:43 +08:00
Dwarven YANG
63072af5bc
allow user to configure the gui language
2021-08-30 09:12:29 +10:00
Davyd McColl
53ea7df655
🚚 move only the platform-specific part of log tailing into platform-specific files
2021-07-01 17:13:14 +10:00
Davyd McColl
533817bda3
🐛 should be TailLogs
2021-07-01 17:13:14 +10:00
Davyd McColl
2ac33bb83d
🎨 split out platform-dependent logging for compile-time selection
2021-07-01 17:13:14 +10:00
Davyd McColl
2b4048ebff
🐛 shouldn't hammer the file continually, have a nap instead
2021-07-01 17:13:14 +10:00
Davyd McColl
31bcd632c7
🎨 observe the error, if there is one
2021-07-01 17:13:14 +10:00
Davyd McColl
aa9ef12d43
✨ make log-watching work on windows
2021-07-01 17:13:14 +10:00
Jesse Duffield
f1d7f59e49
switching repos without restarting the gui
2021-04-06 19:34:32 +10:00
Jesse Duffield
69e9f6d29d
use suspense rather than close the gui when switching to a subprocess
2021-04-06 19:34:32 +10:00
Jesse Duffield
8af3fe3b4a
faster startup
2021-04-01 09:13:29 +11:00
Jesse Duffield
09f32d4f84
add secureexec file for getting around windows checking for a binary first in the current dir
2021-02-08 14:40:30 -08:00
Kalvin Pearce
0a58cb2877
Fix formatting on notARepository checks
2020-11-28 10:51:34 +11:00
Kalvin Pearce
d468866746
Add config option for notInRepo behaviour.
2020-11-28 10:51:34 +11:00
Jesse Duffield
37bb89dac3
type i18n
2020-10-10 00:23:01 +11:00
Jesse Duffield
4912205adb
remove viper
...
WIP
2020-10-10 00:23:01 +11:00
Jesse Duffield
1759ddf247
move OS commands into their own package
2020-09-29 20:48:49 +10:00
Jesse Duffield
75598ea2a1
move git dir env stuff into a centralised package
2020-09-29 17:42:07 +10:00
Jesse Duffield
97af7e677b
support bare repositories
2020-09-29 17:42:07 +10:00
Jesse Duffield
077f113618
add in-built logging support for a better dev experience
2020-09-26 11:00:50 +10:00
Jesse Duffield
307d051ec2
smarter checking of git version
2020-09-18 21:02:27 +10:00
Jesse Duffield
5611d9a3ef
gracefully fail due to git version less than 2.0
2020-08-27 12:21:37 +00:00
Jesse Duffield
4f4bb40ea6
support opening lazygit outside a git directory
2020-08-16 22:59:58 +10:00
Dima Kotik
e73f4c6b7e
Better CWD check for a git repository.
2020-05-30 00:31:58 +10:00
Jesse Duffield
a2790cfe8e
rename to filtered mode
2020-03-29 11:37:29 +11:00
Jesse Duffield
624ae45ebb
allow scoped mode where the commits/reflog/stash panels are scoped to a file
...
WIP
restrict certain actions in scoped mode
WIP
2020-03-29 11:37:29 +11:00
Jesse Duffield
deaa2bcb15
remove rollbar
2020-01-29 17:29:36 +11:00
Giorgio Previtera
9fb9962ce7
472 - Don't panic if not in a repository
...
Display a friendly message and exit with an error if not
in a Git repository. Using the same approach used in this PR:
https://github.com/jesseduffield/lazydocker/pull/14/files
2019-07-14 14:24:18 +10:00
Jesse Duffield
b8baef7b8f
use fork of roll that doesn't care about errors
2019-06-29 20:56:46 +10:00
Jesse Duffield
235a47bb80
Revert "emergency situation: we're not logging to rollrus while we're past the request quota"
...
This reverts commit c107eed890 .
2019-06-29 20:56:46 +10:00
Jesse Duffield
c107eed890
emergency situation: we're not logging to rollrus while we're past the request quota
2019-06-24 12:29:44 +10:00
Jesse Duffield
43e5c042a2
prompt user to git init when outside a repo
2019-03-16 11:38:16 +11:00
Jesse Duffield
39844ffef9
allow a LOG_LEVEL env var to be set
2019-03-16 10:52:30 +11:00
Jesse Duffield
8925b161a7
windows support for skipping the editor
2019-03-03 12:44:10 +11:00
Jesse Duffield
ab81f27fc7
don't show stack trace if lazygit is started outside of a git repo
2019-03-02 21:31:48 +11:00
Jesse Duffield
1337f6e76a
appease golangci
2019-03-02 17:45:53 +11:00
Jesse Duffield
0228e25084
work towards more interactive rebase options
2019-02-19 23:36:36 +11:00
Jesse Duffield
d44638130c
add various interactive rebase commands
2019-02-18 23:27:54 +11:00
Jesse Duffield
76a27f417f
rename any commit
2019-02-18 21:29:43 +11:00
Jesse Duffield
adc2529019
dealing better with errors at the top level
2019-02-18 19:42:23 +11:00