Permalink
Browse files

git writable & git readable (if not pushable)

  • Loading branch information...
1 parent edbf009 commit f680f7b436799f9c792f9af99adf92268b4ce3fb @cadorn cadorn committed Sep 27, 2012
Showing with 10 additions and 2 deletions.
  1. +10 −2 lib/commands/status.js
@@ -348,9 +348,17 @@ command.action(function (options) {
if (!url) return "";
return "( \0yellow(" + url + "\0) )";
}
- function formatWritable() {
+ function formatWritable() {
padding += " ";
- return ((gitInfo.writable)?(" \0cyan(W\0) " + padding.substring(3)):padding);
+ if (gitInfo.type === "git") {
+ if (gitInfo.writable === true) {
+ return " \0cyan(W\0) " + padding.substring(3);
+ } else {
+ return " \0cyan(R\0) " + padding.substring(3);
+ }
+ } else {
+ return padding;
+ }
}
if (context.circular && !ok) {

0 comments on commit f680f7b

Please sign in to comment.