"test" in Solaris' /bin/sh does not support -e
[gitweb.git] / perl / Git.pm
index 61730430f52d58609fdbd7059b54e80d69ba5203..05814477577d79cfda03b1850402de5c40b8b616 100644 (file)
@@ -178,7 +178,8 @@ sub repository {
                };
 
                if ($dir) {
-                       $opts{Repository} = abs_path($dir);
+                       $dir =~ m#^/# or $dir = $opts{Directory} . '/' . $dir;
+                       $opts{Repository} = $dir;
 
                        # If --git-dir went ok, this shouldn't die either.
                        my $prefix = $search->command_oneline('rev-parse', '--show-prefix');
@@ -485,13 +486,13 @@ sub wc_chdir {
 }
 
 
-=item hash_object ( FILENAME [, TYPE ] )
+=item hash_object ( TYPE, FILENAME )
 
-=item hash_object ( FILEHANDLE [, TYPE ] )
+=item hash_object ( TYPE, FILEHANDLE )
 
 Compute the SHA1 object id of the given C<FILENAME> (or data waiting in
-C<FILEHANDLE>) considering it is of the C<TYPE> object type (C<blob>
-(default), C<commit>, C<tree>).
+C<FILEHANDLE>) considering it is of the C<TYPE> object type (C<blob>,
+C<commit>, C<tree>).
 
 In case of C<FILEHANDLE> passed instead of file name, all the data
 available are read and hashed, and the filehandle is automatically