git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH/RFC 3/2] Refactor Git::config_*

From
Jakub Narebski <jnareb@gmail.com>
Date
Oct 17, 2011, 21:47 UTC
Message-ID
<201110172347.42568.jnareb@gmail.com>
In-Reply-To
<7vsjmrl4ur.fsf@alter.siamese.dyndns.org>
On Mon, 17 Oct 2011, Junio C Hamano wrote:
Show 11 quoted lines
> Jakub Narebski <jnareb@gmail.com> writes:
> 
> > This is version which has fixed style to be more Perl-ish, and which
> > actually works (i.e. t9700 passes).
> >
> > I have also moved _config_common() after commands that use it, just like
> > it is done with other "private" methods (methods with names starting with
> > '_'), and excluded this private detail of implementation from docs.
> 
> It seems that this breaks many tests in t9xxx series for me, especially
> the 9100 series that cover git-svn.
Sorry about that, I have ran only t9700-perl-git.sh, which runs all right.

The problem was with duplicated _maybe_self(@_), which should be run only once. t9700-perl-git.sh passed because it uses only (recommended) object form, and not procedural form like git-svn.

The following amend fixes the issue for me:
-- >8 --
diff --git i/perl/Git.pm w/perl/Git.pm
index 8e52290..32f6533 100644
--- i/perl/Git.pm
+++ w/perl/Git.pm
@@ -653,7 +653,7 @@ sub config_int {
 # Common subroutine to implement bulk of what the config* family of methods
 # do. This wraps command('config') so it is not so fast.
 sub _config_common {
-	my ($self, $var, $opts) = _maybe_self(@_);
+	my ($self, $var, $opts) = @_;
 
 	try {
 		my @cmd = ('config', $opts->{'kind'} ? $opts->{'kind'} : ());
-- 8< --

I'll resend amended commit.
-- 
Jakub Narebski
Poland
Previous: Junio C HamanoNext: Junio C Hamano
Message 18 of 24 in “git-send-email.perl: expand filename of aliasesfile”
  1. git-send-email.perl: expand filename of aliasesfileCord Seele, Sep 28, 2011
  2. Matthieu MoySep 28, 2011
  3. Cord SeeleSep 28, 2011
  4. Matthieu MoySep 28, 2011
  5. git-send-email: allow filename expansionCord Seele, Sep 30, 2011
  6. 1/2 Add Git::config_path()Cord Seele, Sep 30, 2011
  7. Jakub NarebskiOct 7, 2011
  8. Junio C HamanoOct 7, 2011
  9. Jakub NarebskiOct 7, 2011
  10. Junio C HamanoOct 7, 2011
  11. 2/2 use new Git::config_path() for aliasesfileCord Seele, Sep 30, 2011
  12. Junio C HamanoSep 30, 2011
  13. Cord SeeleSep 30, 2011
  14. Jakub NarebskiSep 30, 2011
  15. Junio C HamanoSep 30, 2011
  16. 3/2 Refactor Git::config_*Jakub Narebski, Oct 7, 2011
  17. Junio C HamanoOct 17, 2011
  18. Jakub NarebskiOct 17, 2011
  19. Junio C HamanoOct 17, 2011
  20. 3/2 Refactor Git::config_*Jakub Narebski, Oct 18, 2011
  21. Junio C HamanoOct 18, 2011
  22. 3/2 Refactor Git::config_*Jakub Narebski, Oct 18, 2011
  23. Junio C HamanoOct 18, 2011
  24. Jakub NarebskiOct 19, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.