OSDN Git Service

Git.pm: Swap hash_object() parameters
authorPetr Baudis <pasky@suse.cz>
Sun, 25 Jun 2006 01:54:26 +0000 (03:54 +0200)
committerJunio C Hamano <junkio@cox.net>
Mon, 3 Jul 2006 00:14:42 +0000 (17:14 -0700)
I'm about to introduce get_object() and it will be better for consistency
if the object type always goes first. And writing 'blob' there explicitly
is not much bother.

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
perl/Git.pm
perl/Git.xs

index 6173043..5ec7ef8 100644 (file)
@@ -485,13 +485,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
index 8b06ebf..3030ba9 100644 (file)
@@ -104,9 +104,9 @@ CODE:
 }
 
 char *
-xs_hash_object(file, type = "blob")
-       SV *file;
+xs_hash_object(type, file)
        char *type;
+       SV *file;
 CODE:
 {
        unsigned char sha1[20];