diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index eb2dff55f8..a27952d9fd 100755 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -626,7 +626,7 @@ skip_unnecessary_picks () { case "$fd,$command" in 3,pick|3,p) # pick a commit whose parent is current $ONTO -> skip - sha1=$(printf '%s' "$rest" | cut -d ' ' -f 1) + sha1=${rest%% *} case "$(git rev-parse --verify --quiet "$sha1"^)" in "$ONTO"*) ONTO=$sha1 diff --git a/t/t7300-clean.sh b/t/t7300-clean.sh index 7dbbea13ac..6c776e9bec 100755 --- a/t/t7300-clean.sh +++ b/t/t7300-clean.sh @@ -443,7 +443,7 @@ test_expect_success 'git clean -e' ' ( cd repo && git init && - touch 1 2 3 known && + touch known 1 2 3 && git add known && git clean -f -e 1 -e 2 && test -e 1 &&