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

Re: [PATCH v2] git-svn: Simplify calculation of GIT_DIR

From
EWEric Wong <normalperson@yhbt.net>
Date
Mar 8, 2012, 00:51 UTC
Message-ID
<20120308005103.GA27398@dcvr.yhbt.net>
In-Reply-To
<1330804397-43062-1-git-send-email-barry.wardell@gmail.com>
Barry Wardell <barry.wardell@gmail.com> wrote:
> -my $git_dir_user_set = 1 if defined $ENV{GIT_DIR};
> -$ENV{GIT_DIR} ||= '.git';
<snip>
>  unless ($cmd && $cmd =~ /(?:clone|init|multi-init)$/) {
<snip>
Show 7 quoted lines
> +	git_cmd_try {
> +		$ENV{GIT_DIR} = command_oneline([qw/rev-parse --git-dir/]);
> +	} "Unable to find .git directory\n";
> +
> +	chdir $toplevel or die "Unable to chdir to '$toplevel'\n";
>  	$_repository = Git->repository(Repository => $ENV{GIT_DIR});
>  }

It looks like some places in "git svn (init|clone|multi-init)" rely on GIT_DIR being set. I noticed the first test of t9100-git-svn-basic.sh failing (causing everything else in that test to fail) with your patch.

Can you fix those use cases (and ensure tests pass)?  Thanks.
Previous: Barry WardellNext: Barry Wardell
Message 2 of 15 in “git-svn: Simplify calculation of GIT_DIR”
  1. git-svn: Simplify calculation of GIT_DIRBarry Wardell, Mar 3, 2012
  2. Eric WongMar 8, 2012
  3. 0/2 Make git-svn work with gitdir linksBarry Wardell, Jan 21, 2013
  4. 1/2 git-svn: Add test for git-svn repositories with a gitdir linkBarry Wardell, Jan 21, 2013
  5. 2/2 git-svn: Simplify calculation of GIT_DIRBarry Wardell, Jan 21, 2013
  6. Junio C HamanoJan 21, 2013
  7. Joachim SchmitzJan 21, 2013
  8. Philip OakleyJan 21, 2013
  9. Junio C HamanoJan 21, 2013
  10. Eric WongJan 23, 2013
  11. Junio C HamanoJan 23, 2013
  12. Barry WardellJan 23, 2013
  13. Junio C HamanoJan 24, 2013
  14. Eric WongJan 24, 2013
  15. Eric WongJan 24, 2013

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.