Fix broken support for bare repositories
commit1d0f6cb7caa74247ab9d520f3c021b7d6ea88bf2
authorFrej Drejhammar <frej.drejhammar@gmail.com>
Sat, 1 Oct 2016 12:45:48 +0000 (1 14:45 +0200)
committerFrej Drejhammar <frej.drejhammar@gmail.com>
Sat, 1 Oct 2016 12:45:48 +0000 (1 14:45 +0200)
tree269a02a98a302e71cf1be9992ec528326b85ae6e
parent6cf9397bd6aadf659efb5104af4d3f37b0753d73
Fix broken support for bare repositories

The change in 6cf9397bd6aadf659efb5104af4d3f37b0753d73 broke support for
bare repositories. In a bare repo git rev-parse --show-toplevel would
return an empty string and cwd would then be changed to the user's home
directory. In the home directory git rev-parse --git-dir would either
fail or return an unrelated repo.

Problem reported by Ralf Rösch.
hg-fast-export.sh
hg-reset.sh