- stg log foo | grep -q -e "^new" &&
- stg log foo | grep -q -e "^refresh" &&
- stg log | grep -q -e "^new" &&
- stg log | grep -q -e "^refresh"
+ stg log --full foo | grep -q -e "^new" &&
+ stg log --full foo | grep -q -e "^refresh" &&
+ stg log --full | grep -q -e "^new" &&
+ stg log --full | grep -q -e "^refresh"
+ '
+
+test_expect_success \
+ 'Check the log annotation' \
+ '
+ stg log foo | grep -q -e "\[refresh\] foo notes " &&
+ stg log bar | grep -q -e "\[refresh\] " &&
+ stg refresh -p foo --annotate="foo notes 2" &&
+ stg log foo | grep -q -v -e "\[refresh\] foo notes " &&
+ stg log foo | grep -q -e "\[refresh\] foo notes 2"