All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Johannes Schindelin <johannes.schindelin@gmx.de>
Cc: Erik Faye-Lund <kusmabite@googlemail.com>,
	Pat Thoyts <patthoyts@users.sourceforge.net>,
	git@vger.kernel.org
Subject: Re: [PATCH] mingw: introduce the 'core.hideDotFiles' setting
Date: Wed, 04 May 2016 12:06:12 -0700	[thread overview]
Message-ID: <xmqqr3dhhcd7.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <17d30bb680a0452efd7b3c4f42e2f94478a86273.1462372716.git.johannes.schindelin@gmx.de> (Johannes Schindelin's message of "Wed, 4 May 2016 16:40:45 +0200 (CEST)")

Johannes Schindelin <johannes.schindelin@gmx.de> 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?

  parent reply	other threads:[~2016-05-04 19:06 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-04 14:40 [PATCH] mingw: introduce the 'core.hideDotFiles' setting Johannes Schindelin
2016-05-04 16:18 ` Ramsay Jones
2016-05-06 12:06   ` Johannes Schindelin
2016-05-04 19:06 ` Junio C Hamano [this message]
2016-05-06 15:19   ` Johannes Schindelin
2016-05-06 16:34     ` Junio C Hamano
2016-05-06 17:17       ` Junio C Hamano
2016-05-07  6:01         ` Johannes Schindelin
2016-05-07  6:44       ` Johannes Schindelin
2016-05-07  6:44 ` [PATCH v2 0/2] Support marking .git/ (or all files) as hidden on Windows Johannes Schindelin
2016-05-07  6:45   ` [PATCH v2 1/2] mingw: introduce the 'core.hideDotFiles' setting Johannes Schindelin
2016-05-09 17:23     ` Junio C Hamano
2016-05-10 11:58       ` Johannes Schindelin
2016-05-10 17:19         ` Junio C Hamano
2016-05-11  8:40           ` Johannes Schindelin
2016-05-07  6:45   ` [PATCH v2 2/2] mingw: remove unnecessary definition Johannes Schindelin
2016-05-09 17:01   ` [PATCH v2 0/2] Support marking .git/ (or all files) as hidden on Windows Junio C Hamano
2016-05-10  8:41     ` Johannes Schindelin
2016-05-10 17:22       ` Junio C Hamano
2016-05-11  8:34         ` Johannes Schindelin
2016-05-10 11:59   ` [PATCH v3 " Johannes Schindelin
2016-05-10 11:59     ` [PATCH v3 1/2] mingw: introduce the 'core.hideDotFiles' setting Johannes Schindelin
2016-05-10 11:59     ` [PATCH v3 2/2] mingw: remove unnecessary definition Johannes Schindelin
2016-05-11  8:40     ` [PATCH v4 0/2] Support marking .git/ (or all files) as hidden on Windows Johannes Schindelin
2016-05-11  8:43     ` Johannes Schindelin
2016-05-11  8:43       ` [PATCH v4 1/2] mingw: introduce the 'core.hideDotFiles' setting Johannes Schindelin
2016-05-11  8:43       ` [PATCH v4 2/2] mingw: remove unnecessary definition Johannes Schindelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqr3dhhcd7.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=johannes.schindelin@gmx.de \
    --cc=kusmabite@googlemail.com \
    --cc=patthoyts@users.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.