core.hidedotfiles: hide '.git' dir by default

At least for cross-platform projects, it makes sense to hide the
files starting with a dot, as this is the behavior on Unix/MacOSX.

However, at least Eclipse has problems interpreting the hidden flag
correctly, so the default is to hide only the .git/ directory.

The config setting core.hideDotFiles therefore supports not only
'true' and 'false', but also 'dotGitOnly'.

[jes: clarified the commit message, made git init respect the setting
by marking the .git/ directory only after reading the config, and added
documentation, and rebased on top of current junio/next]

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
Erik Faye-Lund
2009-12-16 22:20:55 +01:00
committed by Johannes Schindelin
parent 938e296905
commit bebf11ed64
8 changed files with 96 additions and 6 deletions

View File

@@ -544,4 +544,8 @@ int rmdir_or_warn(const char *path);
*/
int remove_or_warn(unsigned int mode, const char *path);
#ifndef mark_as_git_dir
#define mark_as_git_dir(x) /* noop */
#endif
#endif