Git.pm: Swap hash_object() parameters
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>
Petr Baudis committed
Jun 25, 2006 at 03:54 UTC
24c4b7143639cc821b6d06f9e125429e65dad8cd
2 files changed
+6
-6
perl/Git.pm
+4
-4
@@ -485,13 +485,13 @@ sub wc_chdir {
485
}
486
487
488
-=item hash_object ( FILENAME [, TYPE ] )
488
+=item hash_object ( TYPE, FILENAME )
489
490
-=item hash_object ( FILEHANDLE [, TYPE ] )
490
+=item hash_object ( TYPE, FILEHANDLE )
491
492
Compute the SHA1 object id of the given C<FILENAME> (or data waiting in
493
-C<FILEHANDLE>) considering it is of the C<TYPE> object type (C<blob>
494
-(default), C<commit>, C<tree>).
493
+C<FILEHANDLE>) considering it is of the C<TYPE> object type (C<blob>,
494
+C<commit>, C<tree>).
495
496
In case of C<FILEHANDLE> passed instead of file name, all the data
497
available are read and hashed, and the filehandle is automatically
perl/Git.xs
+2
-2
@@ -104,9 +104,9 @@ CODE:
104
}
105
106
char *
107
-xs_hash_object(file, type = "blob")
108
- SV *file;
107
+xs_hash_object(type, file)
108
char *type;
109
+ SV *file;
110
CODE:
111
{
112
unsigned char sha1[20];