Probably. But then it would be harder to edit .git/config directly, no?
Well, I guess you can always use Bash/vi ;-)
Ciao,
Dscho
I also believe that someone who edits .git/config directly would be
using vi anyways ;-)
But hiding the directory would not necessarily make editing the config
harder. I've configured my Windows Explorer to show hidden files /
folders, and use the "Hidden" attribute just as a "label" which can be
used to filter out files / folders in searches from time to time.
--
Sebastian Schuberth
It depends on how it is hidden. If it using the hidden attribute or just
marking it as system. Depending on how a person has Windows Exploder
they will be able to see not see the directory
Paul Franz
On Thu, 6 Mar 2008, Sebastian Schuberth wrote:
> > On Thu, 6 Mar 2008, sschu...@gmail.com wrote:
> >
> > > I'd like to propose to set the "Hidden" attribute for .git
> > > directories under Windows, just like CVS and Subversion do for the
> > > "CVS" and ".svn" directories. Doing so simplifies browsing /
> > > searching the Working Tree as most tools support to not display /
> > > search hidden files / folders.
> > >
> > > Any chance to implement this?
diff --git a/git-compat-util.h b/git-compat-util.h
index e0fe165..186dc3b 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -552,7 +552,9 @@ static inline int fcntl(int fd, int cmd, long arg)
static inline int mingw_mkdir(const char *path, int mode)
{
- return mkdir(path);
+ return mkdir(path) ||
+ (*path == '.' &&
+ !SetFileAttributes(path, FILE_ATTRIBUTE_HIDDEN));
}
#define mkdir mingw_mkdir
For completeness' sake, we'd have to do this in mingw_open(), too, I
guess, and wrap fopen() too...
Ciao,
Dscho
Thanks!
--
Sebastian Schuberth
Not really. I have my GUI set up to show hidden files and directories
dimmed, not completely hidden. Anyone who wants to edit .git/config
directly could do the same. At least in Windows, showing hidden
files/directories is a checkbox in the options GUI. To make my Mac's
Finder show .files, I would have to set an undocumented flag from the
command line. I'm not sure what the situation is in KDE/GNOME.
At the command line, dir /a shows all files, much like ls -a includes
files that begin with a . (dir /ah shows only hidden files. I suppose
the equivalent would be ls -d .*)
I'm not sure which tools Sebasitan uses to search, but my copy of grep
(native Win32) descends into hidden directories (which is one of the
reasons I switched from svn to git-svn the minute the first msysGit
preview with git-svn support was available).
I do note that my other search tool (Google Desktop) does not search
hidden directories.
> Well, I guess you can always use Bash/vi ;-)
That too.
Peter Harris
I'm using grepWin :-)
http://tools.tortoisesvn.net/grepWin
--
Sebastian Schuberth