PBGitRepository: Correctly indicate bare/non-bare repos
commit5040bdc1c2820459fc20445f8ed1f3b73e063e5f
authorJohannes Gilger <heipei@hackvalue.de>
Wed, 20 May 2009 14:26:33 +0000 (20 16:26 +0200)
committerPieter de Bie <pdebie@ai.rug.nl>
Wed, 27 May 2009 17:10:17 +0000 (27 18:10 +0100)
tree375813fefa8756f00e04d534bb98c666c9c254f4
parentc12e8b9dd4aa215dea40705bffeba14f808de8b0
PBGitRepository: Correctly indicate bare/non-bare repos

This addresses an issue with non-bare repos which had no core.bare
variable in the config. The isBareRepository-function would work
on the full fileURL (pointing to the .git subdir), which in turn would
indicate a bare repo (this is what git rev-parse --is-bare-repository
returns in .git, and the opposite is true for the superdir).

We work around by using the working-dir for a repo (and directly
indicating a bare repo if there is no workdir). The only issue remaining
is the case of a bare repo manually set to "core.bare = false".

Signed-off-by: Johannes Gilger <heipei@hackvalue.de>
PBGitRepository.m