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

Re: [PATCH 4/4] Move initialization of Git::SVN variables into Git::SVN.

From
Michael G Schwern <schwern@pobox.com>
Date
Jul 27, 2012, 08:41 UTC
Message-ID
<50125433.1000702@pobox.com>
In-Reply-To
<7vhast3hpb.fsf@alter.siamese.dyndns.org>
On 2012.7.26 10:18 PM, Junio C Hamano wrote:
Show 6 quoted lines
> If you swap the order of steps 3/4 and 4/4 by creating Git/SVN.pm
> that only has these variable definitions (i.e. "our $X" and "use
> vars $X") and make git-svn.perl use them from Git::SVN in the first
> step, and then do the bulk-moving (equivalent of your 3/4) in the
> second step, would it free you from having to say "it's doubtful it
> will compile by itself"?
If it wasn't clear, all tests pass with every patch using SVN 1.6.

"Compile on its own" wasn't entirely clear. I meant that Git::SVN doesn't depend on git-svn to set its defaults. Git::SVN still depends on it for A LOT of other things, and will likely remain that way for a long time, so it's kinda splitting hairs to worry about it.

4/4 was done last to ensure the phase of git-svn when the Git::SVN globals are initialized remains basically the same. If they were moved into Git::SVN before it was split out they'd be getting initialized *after* the git-svn command has been executed. I didn't want to expend the energy or risk the bugs to get around that.

Show 6 quoted lines
> In short:
> 
>  - I didn't see anything questionable in 1/4;
> 
>  - Calling up ::opt_prefix() from module in 2/4 looked ugly to me
>    but I suspect it should be easy to fix;

Originally I tried to refactor new(). It rapidly turned into a lot of work on undocumented code with no unit tests for no use to the SVN 1.7 issue for one variable. This is a very cheap way to let far more important work move forward and it has a very narrow effect. It could be made a Git::SVN global that git-svn grabs at, but that's not really any better. I'd rather leave it be.

-- 
91. I am not authorized to initiate Jihad.
    -- The 213 Things Skippy Is No Longer Allowed To Do In The U.S. Army
           http://skippyslist.com/list/
Previous: Eric Wong
Message 30 of 30 in “Extract Git::SVN from git-svn, take 2.”
  1. Michael G. SchwernJul 26, 2012
  2. 1/4 Extract some utilities from git-svn to allow extracting Git::SVN.Michael G. Schwern, Jul 26, 2012
  3. Junio C HamanoJul 27, 2012
  4. Michael G SchwernJul 27, 2012
  5. Eric WongJul 27, 2012
  6. 2/4 Prepare Git::SVN for extraction into its own file.Michael G. Schwern, Jul 26, 2012
  7. Junio C HamanoJul 27, 2012
  8. Junio C HamanoJul 27, 2012
  9. Michael G SchwernJul 27, 2012
  10. Eric WongJul 27, 2012
  11. 4/4 Move initialization of Git::SVN variables into Git::SVN.Michael G. Schwern, Jul 26, 2012
  12. Junio C HamanoJul 27, 2012
  13. Jonathan NiederJul 27, 2012
  14. Junio C HamanoJul 27, 2012
  15. Junio C HamanoJul 27, 2012
  16. Junio C HamanoJul 27, 2012
  17. Eric WongJul 27, 2012
  18. Michael G SchwernJul 27, 2012
  19. Eric WongJul 27, 2012
  20. Junio C HamanoJul 27, 2012
  21. Junio C HamanoJul 27, 2012
  22. Eric WongJul 27, 2012
  23. Eric WongJul 27, 2012
  24. Junio C HamanoJul 27, 2012
  25. Eric WongJul 27, 2012
  26. Junio C HamanoJul 27, 2012
  27. Eric WongJul 27, 2012
  28. Junio C HamanoJul 27, 2012
  29. Eric WongJul 27, 2012
  30. Michael G SchwernJul 27, 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.