summaryrefslogtreecommitdiffstats
path: root/git-base.sh
diff options
context:
space:
mode:
authorMichael Allen <michael@michaelallen.io>2015-02-17 21:09:21 +0000
committerMichael Allen <michael@michaelallen.io>2015-02-17 21:09:58 +0000
commit01538d46bac4d2607ad01d04548085f6918ba4d0 (patch)
tree6d9b963502344d320b9d976108d4d43a7c6ae019 /git-base.sh
parenta333df6a1a61f0c0e4bc6d774ceff4e9f6bd61f8 (diff)
downloadgit-sonar-01538d46bac4d2607ad01d04548085f6918ba4d0.tar.gz
git-sonar-01538d46bac4d2607ad01d04548085f6918ba4d0.zip
add functions for conflicted changes
Diffstat (limited to 'git-base.sh')
-rwxr-xr-xgit-base.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/git-base.sh b/git-base.sh
index 20388aa..18d3dec 100755
--- a/git-base.sh
+++ b/git-base.sh
@@ -207,3 +207,21 @@ staged_deleted_changes() {
staged_renamed_changes() {
echo "$(count_from_porcelain "$git_status" "R[A|M|C|D|U|R ] ")"
}
+
+unstaged_modified_changes() {
+ echo "$(count_from_porcelain "$git_status" "[A|M|C|D|U|R ]M ")"
+}
+unstaged_deleted_changes() {
+ echo "$(count_from_porcelain "$git_status" "[A|M|C|D|U|R ]D ")"
+}
+
+conflicted_by_us_changes() {
+ echo "$(count_from_porcelain "$git_status" "[A|M|C|D|R ]U ")"
+}
+conflicted_by_them_changes() {
+ echo "$(count_from_porcelain "$git_status" "U[A|M|C|D|R ] ")"
+}
+conflicted_both_changes() {
+ echo "$(count_from_porcelain "$git_status" "UU ")"
+}
+