From 01538d46bac4d2607ad01d04548085f6918ba4d0 Mon Sep 17 00:00:00 2001 From: Michael Allen Date: Tue, 17 Feb 2015 21:09:21 +0000 Subject: add functions for conflicted changes --- git-base.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'git-base.sh') 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 ")" +} + -- cgit v1.2.3