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>
This commit is contained in:
parent
a6065b548f
commit
24c4b71436
@ -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
|
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>
|
C<FILEHANDLE>) considering it is of the C<TYPE> object type (C<blob>,
|
||||||
(default), C<commit>, C<tree>).
|
C<commit>, C<tree>).
|
||||||
|
|
||||||
In case of C<FILEHANDLE> passed instead of file name, all the data
|
In case of C<FILEHANDLE> passed instead of file name, all the data
|
||||||
available are read and hashed, and the filehandle is automatically
|
available are read and hashed, and the filehandle is automatically
|
||||||
|
@ -104,9 +104,9 @@ CODE:
|
|||||||
}
|
}
|
||||||
|
|
||||||
char *
|
char *
|
||||||
xs_hash_object(file, type = "blob")
|
xs_hash_object(type, file)
|
||||||
SV *file;
|
|
||||||
char *type;
|
char *type;
|
||||||
|
SV *file;
|
||||||
CODE:
|
CODE:
|
||||||
{
|
{
|
||||||
unsigned char sha1[20];
|
unsigned char sha1[20];
|
||||||
|
Loading…
Reference in New Issue
Block a user