[Libreoffice-commits] .: g

Norbert Thiebaud nthiebaud at kemper.freedesktop.org
Tue Nov 29 09:00:31 PST 2011


 g |   19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

New commits:
commit a7069c2aa24f40b8e47d148b7201f879faa2ff32
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Tue Nov 29 10:59:48 2011 -0600

    git rev-parse argument are not files, no need to try to find abs-path
    
    This was causing some error message on Windows

diff --git a/g b/g
index a47f3df..5b39c46 100755
--- a/g
+++ b/g
@@ -220,14 +220,19 @@ while shift ; do
                 exit 1
             }
         fi
-
-        # make the paths absolute
-        FILES[$FILESNUM]=$(perl -e 'use Cwd "abs_path"; print abs_path(shift);' "$PARAM")
-        if [ -z "${FILES[$FILESNUM]}" -o ! -e "${FILES[$FILESNUM]}" ] ; then
-            # it is probably not a file, but a tag name, or something
+        if [ "$COMMAND" == "rev-parse" ] ; then
+            # this is not a file
             FILES[$FILESNUM]="$PARAM"
-        fi
-        FILESNUM=$(($FILESNUM+1))
+            FILESNUM=$(($FILESNUM+1))
+        else
+            # make the paths absolute
+            FILES[$FILESNUM]=$(perl -e 'use Cwd "abs_path"; print abs_path(shift);' "$PARAM")
+            if [ -z "${FILES[$FILESNUM]}" -o ! -e "${FILES[$FILESNUM]}" ] ; then
+                # it is probably not a file, but a tag name, or something
+                FILES[$FILESNUM]="$PARAM"
+            fi
+            FILESNUM=$(($FILESNUM+1))
+       fi
     fi
 done
 


More information about the Libreoffice-commits mailing list