- s=$(git-rev-parse --revs-only --no-flags --default $ref_stash "$@") &&
- w_tree=$(git-rev-parse --verify "$s:") &&
- b_tree=$(git-rev-parse --verify "$s^:") ||
+ # stash records the work tree, and is a merge between the
+ # base commit (first parent) and the index tree (second parent).
+ s=$(git rev-parse --revs-only --no-flags --default $ref_stash "$@") &&
+ w_tree=$(git rev-parse --verify "$s:") &&
+ b_tree=$(git rev-parse --verify "$s^1:") &&
+ i_tree=$(git rev-parse --verify "$s^2:") ||