1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-12-12 11:15:00 +02:00
Commit Graph

19 Commits

Author SHA1 Message Date
Stefan Haller
f4ada537d2 Remove mainBranch parameter from Shell.Init()
For older git versions we won't be able to support any other main branch than
"master", so hard-code that in Init.

This doesn't fix anything for older versions yet; see the next commit for that.
2023-07-10 15:09:17 +02:00
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
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
8a86de85c8 remove log call because it clutters test output 2023-04-30 13:19:53 +10:00
Stefan Haller
a304fed68c Add GitVersion field to NewIntegrationTestArgs
It can be used to specify which git versions a given test should or should not run on.
2023-04-15 08:36:03 +02:00
Jesse Duffield
f7e8b2dd71 cleanup integration test code 2023-02-26 12:54:13 +11:00
Jesse Duffield
7a3291a1f7 fix test 2023-02-12 18:12:01 +11:00
stk
b243f30f48 Disable ~/.gitconfig when running integration tests
A global ~/.gitconfig file can have influence on how integration tests behave;
in my case, I had the option "merge.conflictStyle" set to "diff3", which made
the integration test "cherry_pick_conflict" fail because the diff was different
from what the test expected.

Make this more robust by telling git to ignore the global config file when
running tests.
2023-02-07 17:26:45 +01:00
Jesse Duffield
c5050ecabd move shell into test driver 2022-12-27 21:47:37 +11:00
Jesse Duffield
b623ecf898 add helper functions for popups in tests 2022-12-24 19:15:59 +11:00
Jesse Duffield
dde70486a1 apply user config changes in sandbox mode 2022-12-20 23:07:43 +11:00
Jesse Duffield
e3c6738535 remove snapshot approach for new integration tests 2022-12-20 22:45:03 +11:00
Jesse Duffield
52316e628e fix broken CI (see https://vielmetti.typepad.com/logbook/2022/10/git-security-fixes-lead-to-fatal-transport-file-not-allowed-error-in-ci-systems-cve-2022-39253.html)
try this

WIP
2022-11-12 10:53:12 +11:00
Gustavo Andrioli
39e84e13f4 Use lazycore utils: Clamp and GetLazyRootDirectory 2022-10-15 13:55:44 -03:00
Jesse Duffield
6dca3e1766 allow two attempts on CI 2022-09-16 22:31:46 -07:00
Jesse Duffield
7af7af27c6 various changes to improve integration tests 2022-09-16 08:42:39 -07:00
Ryooooooga
6248091e9c
test: improve integration test portability 2022-08-18 23:48:53 +09:00
Jesse Duffield
5173d7f5e1 better CLI interface 2022-08-14 17:20:52 +10:00
Jesse Duffield
349a7d2453 even better structure 2022-08-14 11:24:07 +10:00