die "Cannot save the current worktree state"
# create the stash
- w_commit=$(printf 'WIP on %s' "$msg" |
+ w_commit=$(printf 'WIP on %s\n' "$msg" |
git commit-tree $w_tree -p $b_commit -p $i_commit) ||
die "Cannot record working tree state"
- git update-ref -m "$msg" $ref_stash $w_commit ||
+ git update-ref -m "WIP on $msg" $ref_stash $w_commit ||
die "Cannot save the current status"
printf >&2 'Saved WIP on %s\n' "$msg"
}