summaryrefslogtreecommitdiffstats
path: root/pkg/commands/oscommands
AgeCommit message (Collapse)Author
2023-05-23Construct arg vector manually rather than parse stringJesse Duffield
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-04-13Change OpenCommand to Open and OpenLinkCommand to OpenLinkStefan Haller
We do this for consistency with the edit settings. The old names are kept as a fallback for now.
2023-04-13Don't set platform defaults on OSConfig struct immediatelyStefan Haller
Instead, query the platform defaults only if the config is empty. This will be necessary later to distinguish an empty config from a default config, so that we can give deprecation warnings.
2023-04-13Remove line number support for "open" commandStefan Haller
The "open" command is supposed to behave in the same way as double-clicking a file in the Finder/Explorer. The concept of jumping to a specific line in the file doesn't make sense for this; use "edit" instead.
2023-04-13Fix windows testsStefan Haller
Now that the tests run again, it turns out that they actually fail, so fix them.
2023-04-13Rename test files so that test discovery works againStefan Haller
These files were renamed from os_windows_test.go to os_test_windows.go (etc.) in 95b2e9540a5. Since then, the tests have no longer run, since go only looks for tests in files ending with "test.go". It isn't important that the file name ends with "_windows.go", since there are already build constrains in the files themselves.
2023-03-19appease golangci-lint (#2512)Jesse Duffield
2023-03-19Fix checking for credentials performance (#2452)Luka Markušić
Co-authored-by: Jesse Duffield <jessedduffield@gmail.com>
2022-11-30Add credential prompts for U2F-backed SSH keysBartłomiej Dach
The 8.2 release of OpenSSH added support for FIDO/U2F hardware authenticators, which manifests in being able to create new types of SSH key, named `ecdsa-sk` nad `ed25519-sk`. This is relevant to lazygit, as those SSH keys can be used to authorise git operations over SSH, as well as signing git commits. Actual code changes are required for correct support, as the authentication process for these types of keys is different than the process for types supported previously. When an operation requiring credentials is initialised with a U2F authenticator-backed key, the first prompt is: Enter PIN for ${key_type} key ${path_to_key}: at which point the user is supposed to enter a numeric (and secret) PIN, specific to the particular FIDO/U2F authenticator using which the SSH keypair was generated. Upon entering the correct key, the user is supposed to physically interact with the authenticator to confirm presence. Sometimes this is accompanied by the following text prompt: Confirm user presence for key ${key_type} ${key_fingerprint} This second prompt does not always occur and it is presumed that the user will know to perform this step even if not prompted specifically. At this stage some authenticator devices may also begin to blink a LED to indicate that they're waiting for input. To facilitate lazygit's interoperability with these types of keys, add support for the first PIN prompt, which allows "fetch", "pull", and "push" git operations to complete.
2022-11-13use tempdir in tests to prevent polluting worktreeJesse Duffield
2022-09-23Merge pull request #2167 from xiaoliwang/remove_deprecatedJesse Duffield
2022-09-19fix(loaders/file.go): changed to ignore stderr when loading git statusRyooooooga
2022-09-17formatterTomCao New Macbook Pro
2022-09-17remove deprecated callsjiepeng
2022-08-30chore: remove duplicate word in commentsAbirdcfly
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
2022-08-07Merge pull request #2004 from mark2185/fix-add-to-gitignore-newlineJesse Duffield
2022-08-07add deadlock mutex packageJesse Duffield
write to deadlock stderr after closing gocui more deadlock checking
2022-08-07move merge conflicts code into controllerJesse Duffield
2022-08-04Test appending to empty fileLuka Markušić
2022-08-03Use tmpdir for testsLuka Markušić
2022-08-03Update pkg/commands/oscommands/os.goLuka Markušić
Co-authored-by: Ryoga <eial5q265e5+github@gmail.com>
2022-08-03Fix the integration testLuka Markušić
2022-08-03Add AppendLineToFile testsLuka Markušić
2022-08-03Preserve trailing newline setting when adding to gitignoreLuka Markušić
2022-08-01add build info when building from sourceJesse Duffield
2022-06-18better process killingJesse Duffield
2022-06-11run integration tests in parallel and properly cache windows buildJesse Duffield
2022-04-02feat: fix permission problem of temp dirsRyooooooga
2022-04-02chore: remove dead codeRyooooooga
2022-03-27show stdout in error message if stderr is blankJesse Duffield
2022-03-25no more naked returnsJesse Duffield
2022-03-24more genericsJesse Duffield
2022-03-19update lintersJesse Duffield
2022-03-17add commit message controllerJesse Duffield
2022-03-17rename OSCommand field to osJesse Duffield
2022-03-17start moving commit panel handlers into controllerJesse Duffield
more and more move rebase commit refreshing into existing abstraction and more and more WIP and more handling clicks properly fix merge conflicts update cheatsheet lots more preparation to start moving things into controllers WIP better typing expand on remotes controller moving more code into controllers
2022-01-22add support for git bisectJesse Duffield
2022-01-21remove redundant title-setting shell command argsBirger Skogeng Pedersen
2022-01-21invoke title-setting shell command appropriatelyBirger Skogeng Pedersen
2022-01-21set repo name as window title when loading repo, fix #1691Birger Skogeng Pedersen
2022-01-15stop refreshing the screen so muchJesse Duffield
2022-01-09more refactoringJesse Duffield
2022-01-09use a string builder for credential checkingJesse Duffield
2022-01-09refactor code for handling credential requestsJesse Duffield
2022-01-09add some more lintersJesse Duffield
2022-01-09fix bug that caused credentials popup to be raised unexpectedlyJesse Duffield
2022-01-09fix testsJesse Duffield
2022-01-09refactorJesse Duffield
2022-01-09start breaking up git structJesse Duffield
2022-01-07fix some thingsJesse Duffield