From 668acc6fc5b6bbf244fc6c9bdba7b4219c9df23b Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Mon, 6 Oct 2014 11:07:21 +0200 Subject: [PATCH] Only hide gitdir if the repository isn't bare This problem was raised on the jgit list https://dev.eclipse.org/mhonarc/lists/jgit-dev/msg02675.html Change-Id: I8ce8a159120ce3747d31d6f012c6d2c0d0ce7917 Signed-off-by: Matthias Sohn --- .../org/eclipse/jgit/internal/storage/file/FileRepository.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileRepository.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileRepository.java index 447e357d5..9670bf10a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileRepository.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileRepository.java @@ -273,7 +273,7 @@ public class FileRepository extends Repository { ConfigConstants.CONFIG_CORE_SECTION, null, ConfigConstants.CONFIG_KEY_HIDEDOTFILES, HideDotFiles.DOTGITONLY); - if (hideDotFiles != HideDotFiles.FALSE) + if (hideDotFiles != HideDotFiles.FALSE && !isBare()) getFS().setHidden(getDirectory(), true); refs.create(); objectDatabase.create();