Releases: wfxr/forgit
Releases · wfxr/forgit
23.02.0
Changes since 23.01.0:
- Fish: assume forgit in vendor_conf.d in case it can not be found in conf.d (#272)
In the fish wrapper, assume forgit-git to be in vendor_conf.d/bin in case it can not be found in conf.d/bin. This fixes forgit not working with fish when located in /usr/share/fish/vendor_conf.d, as is the case with the forgit and forgit-git AUR packages. The location at conf.d is kept (and stays the default), so forgit does not break compatibility with fish plugin managers, such as fisher.
Closes #270 - Add alias gbl for forgit::blame in fish (#273)
Added the alias gbl for forgit::blame to the fish wrapper, so the behavior in fish is the same as in bash/zsh. I've also deleted an empty line where there were two in a row. - Fixed: Untracked files with spaces in the path do not show a preview in 'ga' (#271)
- Fix command list in help output (#274)
'rebase' and 'fixup' were accidentally displayed on the same line. - Add bash completions for git-forgit (#235)
When using forgit as a subcommand of git, put 'git-forgit.bash' in one
of the following places and it will be loaded automatically on tab
completion of 'git forgit' or any configured git aliases of it:- /usr/share/bash-completion/completions
- ~/.local/share/bash-completion/completions
- Only show available cherry picks (#266)
Only shows changes that are eligible for cherry-pick to the branch, not every commit. Also adds nice color to the output - Add alias gct for forgit::checkout::tag in fish (#278)
Noticed there was another alias missing for fish. This is the last one :) - Modify multiple files at once in ga & gcf (#279)
Checkout/Add files in a single command in _forgit_add and _forgit_checkout_file() instead of processing each file individually with xargs. This has the following benefits:
It's faster
Prevents git from spamming "Updated 1 path from the index" for each file when checking out files - fix: glo can not match files (#249)
Fixed "glo -- " behavior to show specified files only instead of
showing all changed files. - Add bash completions for forgit functions and aliases (#275)
When using forgit via the shell plugin, source 'git-forgit.bash'
explicitly after 'forgit.plugin.zsh' to enable tab completion for forgit
shell functions and aliases.
23.01.0
Changes since 22.12.0:
- Fix forgit diff displaying renames on MacOS (#250)
MacOS's 'sed' variant obviously does not parse '\t' as a tabstop per
default. Replacing it with a literal tabstop to make this work. - fix: compatibility check not working in bash (#258)
Fix: backwards compatibility check not working reliably in bash - Provide an input branch with gcp again (#252)
Noticed there was a change recently that broke the ability to pass in an input branch to gcp.
This change is the following:
Fix faulty logic that just led to a git checkout -b being called when you pass in an argument to gcp
If an argument was passed in, check if it is a valid branch, if so, set the input_branch var
If input_branch is set, use it to do the cherry pick, as opposed to the first FZF selection. - Added git stash push selector 'gsp' (#251)
A message can be passed via named argument (-m or --message). All other
arguments (e.g. file paths) will cause git stash push to be run directly without
invoking fzf. - Do not hardcode $SHELL path for bash (#260)
Some systems do not have /bin/bash. e.g., Alpine and NixOS. This change reads
the path dynamically via `which`. It solves the error `fork/exec /bin/bash`. - Ensure that
grcandgcpalways have the correct ordering, regardless of how they were input (#261) (#253)
Closes #253. Essentially the idea is this:
When cherry picking a group of commits, most of the time you want to cherry pick oldest to newest. This means you have the lowest chance of having a conflict or error
when reverting a commit. You most often want to revert from newest to oldest. Similarly prevents errors
This commit does that, based on the wonderful suggestion on how to do that from @carlfriedrich in the linked ticket (#253). - Adding the ability to grh from a subdirectory (#262)
grh didn't work if you were in a subdirectory. See #254 for more details
22.12.0
Important for fish users: If you have installed forgit via fisher, please update it to v4.4.3 or higher before installing this forgit release.
Changes since 22.11.0:
- Move implementation to standalone forgit
Previously we had two different forgit implementations: one for zsh/bash
and one for fish. In this commit we move the bash implementation of the
forgit functions to the git-forgit script in order to have them in the
form of an executable script. This makes using forgit possible without
any shell plugin at all and furthermore removes the need to maintain a
separate implementation for the fish shell.
The simplest way of using forgit from now on is to put git-forgit
somewhere in your PATH and call it via "git forgit", without the need
for any other files.
We keep the shell plugins, though, and maintain backwards compatibility
by retaining the plugin functions as simple wrappers around the
git-forgit script, making the plugins mainly a collection of aliases
only. - zsh plugin: use standardized $0 handling
See https://zdharma-continuum.github.io/Zsh-100-Commits-Club/Zsh-Plugin-Standard.html#zero-handling - fish plugin: move function order to match zsh version
Also add checkout::tag and blame, which were missing. - zsh plugin: exit with an error if bin path cannot be determined
- Add variable for forgit binary
- Ensure that fzf preview commands are executed in bash
All preview commands are written in bash now. fzf, however, uses the
shell defined in $SHELL to run the preview commands. We have to force
this to bash within forgit in order to not get any errors on different
default shells. - Fish plugin: do not quote passing of $argv
Fish stores command line arguments in $argv, which is an array. Unlike
in bash, when passing this array to a function, we must not enclose it
in double-quotes. This made an empty argument list (i.e. no arguments
passed) to an actual empty string argument (i.e. one argument passed),
which is not what we want.
See https://stackoverflow.com/a/42379014/3018229 - Export user-defined FORGIT variables for backwards compatibility
Before forgit became a standalone script, users defined their FORGIT
variables (e.g. FORGIT_FZF_DEFAULT_OPTS) in the shell environment before
sourcing the forgit shell plugin. This worked because the forgit code
was executed within the currently running shell.
With forgit being an executable script, these variables are only
available to forgit when being exported. This patch adds an automatism
for this so that users do not have to change their configuration.
A warning is issued in this case so that users get notified to update
their configuration. - Display useful error message if no or wrong command given
- glo: use forgit::diff when entering a commit (#219)
When using glo (forgit log) we can press Enter to show the changeset of
the selected commit. The presentation, however, was rendered using the
basic git diff command. We have a much more user friendly diff command
gd (forgit diff) right in forgit, though. Use this instead. - Adding a wraps to get fish to autopopulate branches (#255)
22.11.0
Initial release! 🚀