die "$(gettext "Could not skip unnecessary pick commands")"
}
-transform_todo_ids () {
- while read -r command rest
- do
- case "$command" in
- "$comment_char"* | exec)
- # Be careful for oddball commands like 'exec'
- # that do not have a SHA-1 at the beginning of $rest.
- ;;
- *)
- sha1=$(git rev-parse --verify --quiet "$@" ${rest%%[ ]*}) &&
- if test "a$rest" = "a${rest#*[ ]}"
- then
- rest=$sha1
- else
- rest="$sha1 ${rest#*[ ]}"
- fi
- ;;
- esac
- printf '%s\n' "$command${rest:+ }$rest"
- done <"$todo" >"$todo.new" &&
- mv -f "$todo.new" "$todo"
-}
-
expand_todo_ids() {
- transform_todo_ids
+ git rebase--helper --expand-ids
}
collapse_todo_ids() {
- transform_todo_ids --short
+ git rebase--helper --shorten-ids
}
# Rearrange the todo list that has both "pick sha1 msg" and