git-svn: proper detection of bare repositories
commit6e5121f26e95af02d2bbd6a982e44f16e74a67ce
authorDeskin Miller <deskinm@umich.edu>
Thu, 6 Nov 2008 05:07:39 +0000 (6 00:07 -0500)
committerEric Wong <normalperson@yhbt.net>
Thu, 6 Nov 2008 09:39:41 +0000 (6 01:39 -0800)
treef945fed09aee92123cf4153be698e66004a3d0ec
parentaab57205515d9a74fe20cd51c509f65757b97a66
git-svn: proper detection of bare repositories

When in a bare repository (or .git, for that matter), git-svn would fail
to initialise properly, since git rev-parse --show-cdup would not output
anything.  However, git rev-parse --show-cdup actually returns an error
code if it's really not in a git directory.

Fix the issue by checking for an explicit error from git rev-parse, and
setting $git_dir appropriately if instead it just does not output.

Signed-off-by: Deskin Miller <deskinm@umich.edu>
Acked-by: Eric Wong <normalperson@yhbt.net>
git-svn.perl
t/t9100-git-svn-basic.sh