From e7e50bc569b1ed65d98a097889dc19cf046b34a0 Mon Sep 17 00:00:00 2001 From: kalmenn Date: Fri, 22 Dec 2023 18:51:12 +0100 Subject: [PATCH] identity: screw this. Removed the link/include subcommand. removing the setting with sed is just too much work. And I can always just do this manually. --- scripts/identity.sh | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/scripts/identity.sh b/scripts/identity.sh index 7589fcb..09ac202 100755 --- a/scripts/identity.sh +++ b/scripts/identity.sh @@ -1,6 +1,7 @@ #!/bin/sh -identities="$HOME/.local/share/git/identities"; +no_home_identities=".local/share/git/identities" +identities="$HOME/$no_home_identities"; mkdir -p "$identities"; function yes_or_no { # courtesy of: https://stackoverflow.com/a/29436423 @@ -127,7 +128,10 @@ case $1 in echo; echo "Copies the config from an identity to the local git config."; echo "Using set instead of link essentially means that future changes made to the identity will not be synced with the local git config."; - echo "If you wish for that be the case, consider using the link subcommand."; + echo "If you wish for that be the case, you can manually include the identity in your local git config like so:"; + echo; + echo "[include]"; + echo " path = ~/$no_home_identities/" exit 0; fi @@ -140,17 +144,6 @@ case $1 in [ ! -z "$email" ] && git config user.email "$email"; [ ! -z "$sigkey" ] && git config user.signingKey "$sigkey"; ;; - include) - if [ -z "$2" ]; then - echo "USAGE:"; - echo " git identity include "; - echo; - echo "Modifies the local git config to \"[include]\" an identity."; - echo "Further changes made to the identity will thus be kept in sync with the local git config."; - echo "Use this if you don't care about staying consistent in your commits identity."; - echo "If you wish for your commits to stay consistent and always refer to you in the same way, consider using the set subcommand instead."; - fi - ;; show) if [ -z "$2" ]; then display_parts "current" "$(git config user.name)" "$(git config user.email)" "$(git config user.signingKey)";