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.
This commit is contained in:
parent
248da9beb6
commit
e7e50bc569
|
@ -1,6 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
identities="$HOME/.local/share/git/identities";
|
no_home_identities=".local/share/git/identities"
|
||||||
|
identities="$HOME/$no_home_identities";
|
||||||
mkdir -p "$identities";
|
mkdir -p "$identities";
|
||||||
|
|
||||||
function yes_or_no { # courtesy of: https://stackoverflow.com/a/29436423
|
function yes_or_no { # courtesy of: https://stackoverflow.com/a/29436423
|
||||||
|
@ -127,7 +128,10 @@ case $1 in
|
||||||
echo;
|
echo;
|
||||||
echo "Copies the config from an identity to the local git config.";
|
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 "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/<identity>"
|
||||||
exit 0;
|
exit 0;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -140,17 +144,6 @@ case $1 in
|
||||||
[ ! -z "$email" ] && git config user.email "$email";
|
[ ! -z "$email" ] && git config user.email "$email";
|
||||||
[ ! -z "$sigkey" ] && git config user.signingKey "$sigkey";
|
[ ! -z "$sigkey" ] && git config user.signingKey "$sigkey";
|
||||||
;;
|
;;
|
||||||
include)
|
|
||||||
if [ -z "$2" ]; then
|
|
||||||
echo "USAGE:";
|
|
||||||
echo " git identity include <identity>";
|
|
||||||
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)
|
show)
|
||||||
if [ -z "$2" ]; then
|
if [ -z "$2" ]; then
|
||||||
display_parts "current" "$(git config user.name)" "$(git config user.email)" "$(git config user.signingKey)";
|
display_parts "current" "$(git config user.name)" "$(git config user.email)" "$(git config user.signingKey)";
|
||||||
|
|
Loading…
Reference in a new issue