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

Re: [PATCH 1/4] Extract some utilities from git-svn to allow extracting Git::SVN.

From
EWEric Wong <normalperson@yhbt.net>
Date
Jul 25, 2012, 21:24 UTC
Message-ID
<20120725212418.GA17494@dcvr.yhbt.net>
In-Reply-To
<1343196066-81319-2-git-send-email-schwern@pobox.com>
"Michael G. Schwern" <schwern@pobox.com> wrote:
Show 11 quoted lines
> From: "Michael G. Schwern" <schwern@pobox.com>
> 
> Put them in a new module called Git::SVN::Utils.  Yeah, not terribly
> original and it will be a dumping ground.  But its better than having
> them in the main git-svn program.  At least they can be documented
> and tested.
> 
> * fatal() is used by many classes.
> * Change the $can_compress lexical into a function.
> 
> This should be enough to extract Git::SVN.

Please keep Jonathan Cc:-ed, he's been very helpful with this series (and very helpful in general :)

This series is mostly alright by me, a few minor comments inline.
> --- /dev/null
> +++ b/t/Git-SVN/00compile.t
> +
> +use Test::More tests => 1;
> +++ b/t/Git-SVN/Utils/fatal.t
> @@ -0,0 +1,34 @@
> +
> +use Test::More 'no_plan';

Didn't we agree to use done_testing()? Perhaps (as you suggested) with a private copy of Test::More? It's probably easier to start using done_testing() earlier rather than later.

Show 7 quoted lines
> +BEGIN {
> +    # Override exit at BEGIN time before Git::SVN::Utils is loaded
> +    # so it will see our local exit later.
> +    *CORE::GLOBAL::exit = sub(;$) {
> +        return @_ ? CORE::exit($_[0]) : CORE::exit();
> +    };
> +}

For new code related to git-svn, please match the existing indentation style (tabs) prevalent in git-svn. Most of the Perl found in git also uses tabs for indentation.

Previous: Michael G. SchwernNext: Michael G Schwern
Message 3 of 12 in “Move Git::SVN into its own .pm file”
  1. Michael G. SchwernJul 25, 2012
  2. 1/4 Extract some utilities from git-svn to allow extracting Git::SVN.Michael G. Schwern, Jul 25, 2012
  3. Eric WongJul 25, 2012
  4. Michael G SchwernJul 25, 2012
  5. Eric WongJul 25, 2012
  6. Michael G SchwernJul 26, 2012
  7. Eric WongJul 26, 2012
  8. Jonathan NiederJul 26, 2012
  9. 2/4 Prepare Git::SVN for extraction into its own file.Michael G. Schwern, Jul 25, 2012
  10. 4/4 Move initialization of Git::SVN variables into Git::SVN.Michael G. Schwern, Jul 25, 2012
  11. Jonathan NiederJul 25, 2012
  12. Michael G SchwernJul 25, 2012

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.