Commits

Greg Ward  committed aef0977

Print + for uncommitted changes, not !.

(This is inspired by "hg identify", and because "hg status" and
"svn status" both use "!" to mean missing files.)

  • Participants
  • Parent commits 5649b8e

Comments (0)

Files changed (2)

File src/vcprompt.c

                     break;
                 case 'm':
                     if (result->modified)
-                        putc('!', stdout);
+                        putc('+', stdout);
                     break;
                 case 'n':
                     fputs(context->name, stdout);

File tests/test-git

 {
     pretest
     assert_vcprompt "show branch" "master" "%b"
-    assert_vcprompt "show modified" "!" "%m"
+    assert_vcprompt "show modified" "+" "%m"
     assert_vcprompt "show unknown" "?" "%u"
     posttest
 }
 {
     pretest
     touch .git/tainted
-    assert_vcprompt "modified and unknown" "master!?" "%b%m%u"
+    assert_vcprompt "modified and unknown" "master+?" "%b%m%u"
     git reset -q --hard HEAD
     assert_vcprompt "no modified files, still 1 unknown" "master?" "%b%m%u"
     posttest
     pretest
     touch .git/tainted
     rm -f junk
-    assert_vcprompt "modified and ignore, no unknown" "master!" "%b%m%u"
+    assert_vcprompt "modified and ignore, no unknown" "master+" "%b%m%u"
     rm -f a.o
-    assert_vcprompt "modified, no ignored, no unknown" "master!" "%b%m%u"
+    assert_vcprompt "modified, no ignored, no unknown" "master+" "%b%m%u"
     git reset -q --hard HEAD
     assert_vcprompt "no modified, no ignored, no unknown" "master" "%b%m%u"
     posttest