--- Documentation/git-test.txt | 2 ++ git-conditions-lib.sh | 11 +++++++++++ 2 files changed, 13 insertions(+), 0 deletions(-) diff --git a/Documentation/git-test.txt b/Documentation/git-test.txt index 4f86265..e872608 100644 --- a/Documentation/git-test.txt +++ b/Documentation/git-test.txt @@ -72,6 +72,8 @@ CONDITIONS Tests if there are (not) any untracked files in the working tree. '--conflicted'|'--not-conflicted':: Tests if there are (not) any merge conflicts in the index. +'--rebasing'|'--not-rebasing':: + Tests if a rebase is (not) in progress. EXTENDING THE CONDITION LIBRARY ------------------------------- diff --git a/git-conditions-lib.sh b/git-conditions-lib.sh index 7f3724e..0d6e0a1 100644 --- a/git-conditions-lib.sh +++ b/git-conditions-lib.sh @@ -53,5 +53,16 @@ check_conflicted_0() } +check_rebasing_0() +{ + if test -d "$(git rev-parse --git-dir)/rebase-apply" + then + echo "A rebase is in progress." + else + echo "There is no rebase in progress." + false + fi +} + fi -- 1.7.5.rc1.23.g7f622 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html