summaryrefslogtreecommitdiffstats
path: root/pkg/commands/git_commands/stash.go
AgeCommit message (Collapse)Author
2024-05-18Fix stashing partialy staged files for git version >= 2.35.0dsolerhww
Use `git stash push --staged` git feature available on git version > 2.35.0.
2024-04-12rename sha to hashpikomonde
2024-01-24Refactor repo_paths.go to use git rev-parseJohn Whitley
This changes GetRepoPaths() to pull information from `git rev-parse` instead of effectively reimplementing git's logic for pathfinding. This change fixes issues with bare repos, esp. versioned homedir use cases, by aligning lazygit's path handling to what git itself does. This change also enables lazygit to run from arbitrary subdirectories of a repository, including correct handling of symlinks, including "deep" symlinks into a repo, worktree, a repo's submodules, etc. Integration tests are now resilient against unintended side effects from the host's environment variables. Of necessity, $PATH and $TERM are the only env vars allowed through now.
2023-09-05Move diff context size from UserConfig to AppStateStefan Haller
2023-09-04Don't pass ignoreWhitespace to git commandsStefan Haller
Now that AppState is available via common.Common, they can take it from there.
2023-07-10Replace uses of "git stash save" with "git stash push"Stefan Haller
Save has been deprecated for a while, push is the recommended way to save a stash. Push has been available since 2.13, so we can use it without problems.
2023-07-10Fix git stash calls for older git versionsStefan Haller
Older git versions are pickier about parameter order: for "store", the sha argument must come last, and for "save", the message must come last.
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-05-20Add convenience builder for git commandsJesse Duffield
2023-05-19Support ignoring whitespace on stashJesse Duffield
2022-11-14Merge pull request #1980 from ajhynes7/stash-untracked-changesJesse Duffield
2022-11-14Merge loaders package into git_commands packagesudoburt
2022-11-01Merge branch 'master' into stash-untracked-changesAndrew Hynes
2022-10-16chore: refactor rename stashRyooooooga
2022-10-16chore: refactor rename stashRyooooooga
2022-10-16chore: remove unnecessary spaceRyoga
Co-authored-by: Jesse Duffield <jessedduffield@gmail.com>
2022-10-16feat: add rename stashRyooooooga
2022-09-15refactor: rename method to `StashIncludeUntrackedChanges`Andrew Hynes
2022-09-15fix: use message in git stash commandAndrew Hynes
2022-09-15refactor: remove redundant if statementAndrew Hynes
2022-09-15refactor: use extended flag nameAndrew Hynes
2022-09-15feat: add stash option to include untracked changesAndrew Hynes
2022-05-08Discard staged changes onlyLuka Markušić
2022-04-17Add integration testsLuka Markušić
2022-04-14The four horsemen of stashingLuka Markušić
2022-04-10Add option to stash only unstaged filesLuka Markušić
2022-01-18refactor to group up more commonly used git command stuffJesse Duffield
2022-01-09refactorJesse Duffield