Re: [PATCH] mingw: introduce the 'core.hideDotFiles' setting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Johannes Schindelin <johannes.schindelin@xxxxxx> writes:

> diff --git a/builtin/init-db.c b/builtin/init-db.c
> index b2d8d40..c4269ac 100644
> --- a/builtin/init-db.c
> +++ b/builtin/init-db.c
> @@ -370,6 +370,7 @@ int init_db(const char *template_dir, unsigned int flags)
>  	check_repository_format();
>  
>  	reinit = create_default_files(template_dir);
> +	mark_as_git_dir(get_git_dir());
>  
>  	create_object_directory();
>  

I agree with the goal of the change, but I am having a hard time
justifying this addition.  Primarily because I do not understand the
need for this.

In order to be prepared to handle HIDE_DOTFILES_TRUE case,
mingw_mkdir() needs to be taught about needs_hiding() and
make_hidden() already.  Why isn't it sufficient to teach
needs_hiding() to check with !strcmp(basename(path, ".git"))
under HIDE_DOTFILES_DOTGITONLY?

I do not understand why core.hideDotFiles needs to be explicitly
copied to the config file in the resulting repository, either.

Once you created a repository, Git won't unhide the hidden .git of
that reposiotry, so the idea must be to propagate the setting to a
new repository that will further be created, but wouldn't that get
the "please hide" preference from the same place as we have got the
preference to hide .git when the current repository was created
anyway?

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]