summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a6065b5)
raw | patch | inline | side by side (parent: a6065b5)
author | Petr Baudis <pasky@suse.cz> | |
Sun, 25 Jun 2006 01:54:26 +0000 (03:54 +0200) | ||
committer | Junio 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>
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 | patch | blob | history | |
perl/Git.xs | patch | blob | history |
diff --git a/perl/Git.pm b/perl/Git.pm
index 61730430f52d58609fdbd7059b54e80d69ba5203..5ec7ef8c246bdcfab725490ce383fee083ff8f82 100644 (file)
--- a/perl/Git.pm
+++ b/perl/Git.pm
}
-=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
diff --git a/perl/Git.xs b/perl/Git.xs
index 8b06ebfae9e7b96c71a2fb03851d99b76ee88ec6..3030ba9ab55e05a6a0debc18e634e25c0a8e6ece 100644 (file)
--- a/perl/Git.xs
+++ b/perl/Git.xs
}
char *
-xs_hash_object(file, type = "blob")
- SV *file;
+xs_hash_object(type, file)
char *type;
+ SV *file;
CODE:
{
unsigned char sha1[20];