]> source.dussan.org Git - jgit.git/commitdiff
Only hide gitdir if the repository isn't bare 39/34439/2
authorMatthias Sohn <matthias.sohn@sap.com>
Mon, 6 Oct 2014 09:07:21 +0000 (11:07 +0200)
committerMatthias Sohn <matthias.sohn@sap.com>
Tue, 7 Oct 2014 07:28:58 +0000 (09:28 +0200)
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 <matthias.sohn@sap.com>
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileRepository.java

index 447e357d5a3be5b617b36432af4a7202cbd283ee..9670bf10a2bc6bc2e2667db5106192155cb69e85 100644 (file)
@@ -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();