@@ -804,6 +804,99 @@ test_expect_success 'push -m shows right message' '
804804 test_cmp expect actual
805805'
806806
807+ test_expect_success ' push -m also works without space' '
808+ >foo &&
809+ git add foo &&
810+ git stash push -m"unspaced test message" &&
811+ echo "stash@{0}: On master: unspaced test message" >expect &&
812+ git stash list -1 >actual &&
813+ test_cmp expect actual
814+ '
815+
816+ test_expect_success ' store -m foo shows right message' '
817+ git stash clear &&
818+ git reset --hard &&
819+ echo quux >bazzy &&
820+ git add bazzy &&
821+ STASH_ID=$(git stash create) &&
822+ git stash store -m "store m" $STASH_ID &&
823+ echo "stash@{0}: store m" >expect &&
824+ git stash list -1 >actual &&
825+ test_cmp expect actual
826+ '
827+
828+ test_expect_success ' store -mfoo shows right message' '
829+ git stash clear &&
830+ git reset --hard &&
831+ echo quux >bazzy &&
832+ git add bazzy &&
833+ STASH_ID=$(git stash create) &&
834+ git stash store -m"store mfoo" $STASH_ID &&
835+ echo "stash@{0}: store mfoo" >expect &&
836+ git stash list -1 >actual &&
837+ test_cmp expect actual
838+ '
839+
840+ test_expect_success ' store --message=foo shows right message' '
841+ git stash clear &&
842+ git reset --hard &&
843+ echo quux >bazzy &&
844+ git add bazzy &&
845+ STASH_ID=$(git stash create) &&
846+ git stash store --message="store message=foo" $STASH_ID &&
847+ echo "stash@{0}: store message=foo" >expect &&
848+ git stash list -1 >actual &&
849+ test_cmp expect actual
850+ '
851+
852+ test_expect_success ' store --message foo shows right message' '
853+ git stash clear &&
854+ git reset --hard &&
855+ echo quux >bazzy &&
856+ git add bazzy &&
857+ STASH_ID=$(git stash create) &&
858+ git stash store --message "store message foo" $STASH_ID &&
859+ echo "stash@{0}: store message foo" >expect &&
860+ git stash list -1 >actual &&
861+ test_cmp expect actual
862+ '
863+
864+ test_expect_success ' push -mfoo uses right message' '
865+ >foo &&
866+ git add foo &&
867+ git stash push -m"test mfoo" &&
868+ echo "stash@{0}: On master: test mfoo" >expect &&
869+ git stash list -1 >actual &&
870+ test_cmp expect actual
871+ '
872+
873+ test_expect_success ' push --message foo is synonym for -mfoo' '
874+ >foo &&
875+ git add foo &&
876+ git stash push --message "test message foo" &&
877+ echo "stash@{0}: On master: test message foo" >expect &&
878+ git stash list -1 >actual &&
879+ test_cmp expect actual
880+ '
881+
882+ test_expect_success ' push --message=foo is synonym for -mfoo' '
883+ >foo &&
884+ git add foo &&
885+ git stash push --message="test message=foo" &&
886+ echo "stash@{0}: On master: test message=foo" >expect &&
887+ git stash list -1 >actual &&
888+ test_cmp expect actual
889+ '
890+
891+ test_expect_success ' push -m shows right message' '
892+ >foo &&
893+ git add foo &&
894+ git stash push -m "test m foo" &&
895+ echo "stash@{0}: On master: test m foo" >expect &&
896+ git stash list -1 >actual &&
897+ test_cmp expect actual
898+ '
899+
807900test_expect_success ' create stores correct message' '
808901 >foo &&
809902 git add foo &&
0 commit comments