From 19bbf44c673104a7fa5a8d912254e7dd7c993914 Mon Sep 17 00:00:00 2001 From: Minijackson Date: Sat, 4 Feb 2023 15:00:00 +0100 Subject: git: install branchless globally, fix `git sw` --- common/commandline/git.nix | 7 ++++--- dotfiles/git-branchless.zsh | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/common/commandline/git.nix b/common/commandline/git.nix index fb9bed2..7c387c2 100644 --- a/common/commandline/git.nix +++ b/common/commandline/git.nix @@ -3,9 +3,10 @@ inputs: { config, pkgs, lib, ... }: { - users.users.minijackson.packages = [pkgs.git-branchless]; - - environment.shellAliases.git = "git-branchless wrap --"; + environment = { + systemPackages = [pkgs.git-branchless]; + shellAliases.git = "git-branchless wrap --"; + }; programs.zsh.interactiveShellInit = '' source ${../../dotfiles/git-branchless.zsh} diff --git a/dotfiles/git-branchless.zsh b/dotfiles/git-branchless.zsh index c34b241..4fbf0a1 100644 --- a/dotfiles/git-branchless.zsh +++ b/dotfiles/git-branchless.zsh @@ -184,7 +184,7 @@ _git-branchless-switch() { {-c,--create}"[When checking out the target commit, also create a branch with the provided name pointing to that commit]:branch name" \ {-f,--force}"[Forcibly switch commits, discarding any working copy changes if necessary]" \ {-m,--merge}"[If the current working copy changes do not apply cleanly to the target commit, start merge conflict resolution instead of aborting]" \ - "::target:__git_recent_commits" + "::target:__git_commits_prefer_recent" return 0 } -- cgit v1.2.3