Browse Source

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 <matthias.sohn@sap.com>
stable-3.5
Matthias Sohn 10 years ago
parent
commit
668acc6fc5
  1. 2
      org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileRepository.java

2
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_CORE_SECTION, null,
ConfigConstants.CONFIG_KEY_HIDEDOTFILES, ConfigConstants.CONFIG_KEY_HIDEDOTFILES,
HideDotFiles.DOTGITONLY); HideDotFiles.DOTGITONLY);
if (hideDotFiles != HideDotFiles.FALSE) if (hideDotFiles != HideDotFiles.FALSE && !isBare())
getFS().setHidden(getDirectory(), true); getFS().setHidden(getDirectory(), true);
refs.create(); refs.create();
objectDatabase.create(); objectDatabase.create();

Loading…
Cancel
Save