diff --git a/.local/bin/scripts/git-moves b/.local/bin/scripts/git-moves index 77130c1..60fcb2f 100755 --- a/.local/bin/scripts/git-moves +++ b/.local/bin/scripts/git-moves @@ -3,6 +3,7 @@ git diff --name-only --cached >/tmp/staged root=$(git rev-parse --show-toplevel) git add "$root" -git status --porcelain --find-renames=.3 | +git status --porcelain --find-renames=.2 | grep -vf /tmp/staged | cut -c4- | sed 's/ -> /\n/' | xargs git -C "$root" restore --staged +git status -s --find-renames=.2 diff --git a/.local/bin/scripts/git-repo b/.local/bin/scripts/git-repo index 1b7b26e..09057b6 100755 --- a/.local/bin/scripts/git-repo +++ b/.local/bin/scripts/git-repo @@ -6,5 +6,11 @@ case "$1" in (http*) echo "$1" | sed "s|.*//\([^/]*\)/\(.*\)|git@\1:\2.git|" ;; (git:*) echo "$1" ;; - (*) echo "${1:-git.jfischer.org}:${3:-$(git config user.name)}/${2:-$(basename $PWD)}.git" ;; + (*) host=$1 + case $1 in + (hub) host=git@github.com;; + (lab) host=git@gitlab.com;; + (*) host=$1;; + esac + echo "${host:-git.jfischer.org}:${3:-$(git config user.name)}/${2:-$(basename $PWD)}.git" ;; esac