public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Petr Baudis <pasky@suse•cz>
To: Junio C Hamano <junkio@cox•net>
Cc: <git@vger•kernel.org>
Subject: [PATCH 3/7] Git.pm: Swap hash_object() parameters
Date: Sun, 25 Jun 2006 03:54:26 +0200	[thread overview]
Message-ID: <20060625015426.29906.54971.stgit@machine.or.cz> (raw)
In-Reply-To: <20060625015421.29906.50002.stgit@machine.or.cz>

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>
---

 perl/Git.pm |    8 ++++----
 perl/Git.xs |    4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/perl/Git.pm b/perl/Git.pm
index 6da11a6..eea6c07 100644
--- a/perl/Git.pm
+++ b/perl/Git.pm
@@ -570,13 +570,13 @@ sub ident_person {
 
 
 
-=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 ebaac4b..2fd1c67 100644
--- a/perl/Git.xs
+++ b/perl/Git.xs
@@ -105,9 +105,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];

  parent reply	other threads:[~2006-06-25  1:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-25  1:54 [PATCH 1/7] Git.pm: Introduce ident() and ident_person() methods Petr Baudis
2006-06-25  1:54 ` [PATCH 2/7] Git.pm: Try to support ActiveState output pipe Petr Baudis
2006-06-25  1:54 ` Petr Baudis [this message]
2006-06-25  1:54 ` [PATCH 4/7] Git.pm: Fix Git->repository("/somewhere/totally/elsewhere") Petr Baudis
2006-06-25  1:54 ` [PATCH 5/7] Make it possible to set up libgit directly (instead of from the environment) Petr Baudis
2006-06-25  1:54 ` [PATCH 6/7] Git.pm: Introduce fast get_object() method Petr Baudis
2006-06-25  1:54 ` [PATCH 7/7] Convert git-annotate to use Git.pm Petr Baudis
2006-06-25  9:27   ` Ryan Anderson
2006-06-25  9:36     ` Petr Baudis
2006-06-25  1:57 ` [PATCH 1/7] Git.pm: Introduce ident() and ident_person() methods Petr Baudis
2006-06-25  5:25   ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060625015426.29906.54971.stgit@machine.or.cz \
    --to=pasky@suse$(echo .)cz \
    --cc=git@vger$(echo .)kernel.org \
    --cc=junkio@cox$(echo .)net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox