File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,8 +17,8 @@ eval $(
1717# Get the repository host
1818host=$( echo " ${repo} " | sed -E ' s/https?:\/\/([^/]+)\/.*/\1/' )
1919
20- # Keep only the repository name
21- repo=$( echo " ${repo} " | sed -E ' s/.*github.com\/([^/]+)\/([^/]+).*/\1\/\2/' )
20+ # Keep only the repository name. Eventually remove .git suffix
21+ repo=$( echo " ${repo} " | sed -E -e ' s/.*github.com\/([^/]+)\/([^/]+).*/\1\/\2/ ' -e ' s/\.git$/ /' )
2222
2323# Check if the directory is provided
2424if [ -z " ${directory} " ]; then
Original file line number Diff line number Diff line change @@ -14,16 +14,15 @@ cd "$(git rev-parse --show-toplevel)"
1414# Fetch updates from the remote repository
1515git fetch --progress --prune --recurse-submodules=no origin > /dev/null
1616
17- if [ -n " $force " ]; then
18- zz_log w " Force mode enabled, overwriting pushed history"
19- git forceable >&2
20- read -p ' Which commit? ' sha
21- elif [ -z " $sha " ]; then
22- git fixable >&2
23- read -p ' Which commit? ' sha
24- else
25- # ### Use given commit
26- sha=$1
17+ if [ -z " $sha " ]; then
18+ if [ -n " $force " ]; then
19+ zz_log w " Force mode enabled, overwriting pushed history"
20+ git forceable >&2
21+ read -p ' Which commit? ' sha
22+ else
23+ git fixable >&2
24+ read -p ' Which commit? ' sha
25+ fi
2726fi
2827
2928# ### Display commit to fixup, keep only the sha, remove new line
You can’t perform that action at this time.
0 commit comments