提交 63df97ae 编写于 作者: P Petr Baudis 提交者: Junio C Hamano

Git.pm: Implement Git::version()

Git::version() returns the Git version string.
Signed-off-by: NPetr Baudis <pasky@suse.cz>
Signed-off-by: NJunio C Hamano <junkio@cox.net>
上级 8062f81c
......@@ -610,7 +610,10 @@ $(XDIFF_LIB): $(XDIFF_OBJS)
perl/Makefile: perl/Git.pm perl/Makefile.PL
(cd perl && $(PERL_PATH) Makefile.PL PREFIX="$(prefix)" DEFINE="$(ALL_CFLAGS)" LIBS="$(LIBS)")
(cd perl && $(PERL_PATH) Makefile.PL \
PREFIX="$(prefix)" \
DEFINE="$(ALL_CFLAGS) -DGIT_VERSION=\\\"$(GIT_VERSION)\\\"" \
LIBS="$(LIBS)")
doc:
$(MAKE) -C Documentation all
......
......@@ -48,7 +48,7 @@ =head1 SYNOPSIS
# Methods which can be called as standalone functions as well:
@EXPORT_OK = qw(command command_oneline command_pipe command_noisy
exec_path hash_object);
version exec_path hash_object);
=head1 DESCRIPTION
......@@ -285,6 +285,18 @@ sub command_noisy {
}
=item version ()
Return the Git version in use.
Implementation of this function is very fast; no external command calls
are involved.
=cut
# Implemented in Git.xs.
=item exec_path ()
Return path to the git sub-command executables (the same as
......
......@@ -23,6 +23,16 @@ PROTOTYPES: DISABLE
# /* TODO: xs_call_gate(). See Git.pm. */
const char *
xs_version()
CODE:
{
RETVAL = GIT_VERSION;
}
OUTPUT:
RETVAL
const char *
xs_exec_path()
CODE:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册