author | Deskin Miller <deskinm@umich.edu> | |
Thu, 6 Nov 2008 05:07:39 +0000 (00:07 -0500) | ||
committer | Eric Wong <normalperson@yhbt.net> | |
Fri, 14 Nov 2008 06:33:59 +0000 (22:33 -0800) | ||
commit | fe4003f6308b88bcc44a989f12e1baddd97f22d4 | |
tree | fa76d099401455c6ea3ed146fccc24a5eb461948 | tree | snapshot |
parent | 16fc08e2d86dad152194829d21bc55b2ef0c8fb1 | commit | diff |
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>
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 | diff | blob | history | |
t/t9100-git-svn-basic.sh | diff | blob | history |