[Libreoffice-commits] .: bin/g

Petr Mladek pmladek at kemper.freedesktop.org
Fri Oct 8 09:09:41 PDT 2010


 bin/g |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 5f23beabe74f4275f5e3edf9c3c27fed1de29f05
Author: Petr Mladek <pmladek at suse.cz>
Date:   Fri Oct 8 18:08:21 2010 +0200

    support bin/g commit --allow-empty
    
    it is needed to add the release commmit message

diff --git a/bin/g b/bin/g
index 2fca333..f27d1ab 100755
--- a/bin/g
+++ b/bin/g
@@ -20,6 +20,7 @@ COMMAND="$1"
 PAGER=
 RELATIVIZE=1
 PUSH_ALL=
+ALLOW_EMPTY=
 KEEP_GOING=0
 REPORT_REPOS=1
 
@@ -76,6 +77,8 @@ while shift ; do
             FILES[$FILESNUM]="$1"
             FILESNUM=$(($FILESNUM+1))
         else
+            [ "$COMMAND" = "commit" -a "$PARAM" = "--allow-empty" ] && ALLOW_EMPTY=1
+
             FILES[$FILESNUM]="$PARAM"
             FILESNUM=$(($FILESNUM+1))
         fi
@@ -144,7 +147,9 @@ for DIR in * ; do
                     done
                     ;;
                 commit)
-                    [ -z "`git diff-index --name-only HEAD --`" ] && exit 0
+                    if [ "$ALLOW_EMPTY" != "1" ] ; then
+                        [ -z "`git diff-index --name-only HEAD --`" ] && exit 0
+                    fi
                     ;;
                 push)
                     if [ "$PUSH_ALL" != "1" ] ; then


More information about the Libreoffice-commits mailing list