From: Jonathan Nieder <jrnieder@gmail.com>
To: demerphq <demerphq@gmail.com>
Cc: "Junio C Hamano" <gitster@pobox.com>,
"Ævar Arnfjörð" <avarab@gmail.com>,
"Josef Wolf" <jw@raven.inka.de>,
git@vger.kernel.org, "Petr Baudis" <pasky@suse.cz>
Subject: [RFC/PATCH] Git.pm: discourage casual use
Date: Thu, 2 Dec 2010 13:05:46 -0600 [thread overview]
Message-ID: <20101202190546.GI3962@burratino> (raw)
In-Reply-To: <AANLkTimKKssBbtuLKCqG9WGbOe+-CH4pc5PDaNxCH_PS@mail.gmail.com>
Git's internal perl interface still does not have a stable API, and
meanwhile CPAN has a number of modules to fulfill the need for a perl
git interface. The line
# Totally unstable API.
$VERSION = '0.01';
in the source makes this clear enough, but users who just looked at
git-svn.perl and then tried "perldoc Git" would not notice. Add a
note to the manual to warn the reader.
Inspired-by: Yves Orton <demerphq@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
demerphq wrote:
> And well the line:
>
> # Totally unstable API.
> $VERSION = '0.01';
>
> STRONGLY suggests that the module should not be used by code outside
> the Git package itself.
So how about something like this patch, to start?
diff --git a/perl/Git.pm b/perl/Git.pm
index 6cb0dd1..7f6c500 100644
--- a/perl/Git.pm
+++ b/perl/Git.pm
@@ -63,12 +63,16 @@ require Exporter;
=head1 DESCRIPTION
-This module provides Perl scripts easy way to interface the Git version control
-system. The modules have an easy and well-tested way to call arbitrary Git
+This module provides an easy way to interact with the Git version control
+system for Git's internal perl scripts.
+The modules have an easy and well-tested way to call arbitrary Git
commands; in the future, the interface will also provide specialized methods
for doing easily operations which are not totally trivial to do over
the generic command interface.
+Note: this module should not be used by code outside the Git package itself,
+since the API is not stable yet.
+
While some commands can be executed outside of any context (e.g. 'version'
or 'init'), most operations require a repository context, which in practice
means getting an instance of the Git object using the repository() constructor.
next prev parent reply other threads:[~2010-12-02 19:06 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-02 11:40 Problems using perl's Git.pm module Josef Wolf
2010-12-02 13:23 ` Ævar Arnfjörð Bjarmason
2010-12-02 16:19 ` Jonathan Nieder
2010-12-02 17:30 ` Ævar Arnfjörð Bjarmason
2010-12-02 17:46 ` Junio C Hamano
2010-12-02 18:10 ` demerphq
2010-12-02 18:14 ` Jonathan Nieder
2010-12-02 18:41 ` demerphq
2010-12-02 19:05 ` Jonathan Nieder [this message]
2010-12-02 19:30 ` [RFC/PATCH] Git.pm: discourage casual use Junio C Hamano
2010-12-02 19:45 ` Jonathan Nieder
2010-12-03 8:38 ` Problems using perl's Git.pm module Josef Wolf
2010-12-03 9:02 ` demerphq
2010-12-02 18:18 ` Junio C Hamano
2010-12-02 18:32 ` demerphq
2010-12-03 8:27 ` Josef Wolf
2010-12-03 9:10 ` Jonathan Nieder
2010-12-02 17:51 ` Junio C Hamano
2010-12-03 8:14 ` Josef Wolf
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=20101202190546.GI3962@burratino \
--to=jrnieder@gmail.com \
--cc=avarab@gmail.com \
--cc=demerphq@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jw@raven.inka.de \
--cc=pasky@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).