git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Daniel Barkalow <barkalow@iabervon.org>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Pieter de Bie <pdebie@ai.rug.nl>,
	Git Mailinglist <git@vger.kernel.org>
Subject: Re: [PATCH 1/2] clone: respect the settings in $HOME/.gitconfig and /etc/gitconfig
Date: Sun, 29 Jun 2008 18:20:03 -0700	[thread overview]
Message-ID: <7vabh390sc.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <alpine.LNX.1.00.0806291821520.19665@iabervon.org> (Daniel Barkalow's message of "Sun, 29 Jun 2008 18:47:33 -0400 (EDT)")

Daniel Barkalow <barkalow@iabervon.org> writes:

> ... In any case, I don't think "git clone" is at 
> all special with respect to GIT_CONFIG.

I think "git init" and "git clone" are very special with respect to
GIT_CONFIG.

 * When "init" is run to create a new repository and initialize it, the
   user would want the initial set of configuration populated in the
   configuration file _for that repository_.  There however may be some
   customization that affects the way how "init" operates, which might be
   taken from $HOME/.gitconfig.  The meaning of GIT_CONFIG can get fuzzy
   here.  Possibilities:

   (1) Instead of $HOME/.gitconfig (or /etc/gitconfig), the user might
       want such customizations to be read from the file specified by
       GIT_CONFIG.  But the user wants to make the resulting new
       repository usable without any custom GIT_CONFIG set (i.e. its
       $GIT_DIR/config will be the place the configuration is written).

   (2) The user may want to create a new repository that cannot be used
       with GIT_CONFIG (for some strange reason), i.e. no $GIT_DIR/config
       for the repository, and GIT_CONFIG is used to specify where that
       separate configuration file for the new repository is.  The way
       "init" operates does not come from that configuration file that is
       to be created but from elsewhere.

 * When "clone" is run, the same confusion as initializing "init" applies.
   In addition, custom GIT_CONFIG to read customizations for behaviour of
   "init" and "fetch" that is done internally by "clone" would play larger
   role.

 * When "init" is run to reinitialize an existing repository, it is not
   special in any way with respect to GIT_CONFIG, compared to other
   commands.  The GIT_CONFIG names the configuration for that existing
   repository, so we read from it and write to it.

I personally think the case (2) is a very narrow special case that I do
not think of any sane reason to even wanting to do so.  IOW, "you _could_
interpret the presense of GIT_CONFIG that the user may want to do so, but
why?"  (1) is also probably not very sensible but it makes more sense.

I think Dscho's original patch would support the semantics (1) and it is
probably much saner than (2) which is your version does (if I am reading
the two patches correctly).

  parent reply	other threads:[~2008-06-30  1:21 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-27  9:35 Using url.insteadOf in git-clone Pieter de Bie
2008-06-27 12:55 ` [PATCH 1/2] clone: respect the settings in $HOME/.gitconfig and /etc/gitconfig Johannes Schindelin
2008-06-27 12:56   ` [PATCH 2/2] clone: respect url.insteadOf setting in global configs Johannes Schindelin
2008-06-27 16:08     ` Daniel Barkalow
2008-06-29 20:12     ` Pieter de Bie
2008-06-29 21:50       ` Johannes Schindelin
2008-06-27 16:05   ` [PATCH 1/2] clone: respect the settings in $HOME/.gitconfig and /etc/gitconfig Daniel Barkalow
2008-06-27 22:40     ` Junio C Hamano
2008-06-29 18:31       ` Daniel Barkalow
2008-06-29 20:36         ` Junio C Hamano
2008-06-29 21:49         ` Johannes Schindelin
2008-06-29 22:47           ` Daniel Barkalow
2008-06-30  0:41             ` Johannes Schindelin
2008-06-30  1:54               ` Daniel Barkalow
2008-06-30  1:20             ` Junio C Hamano [this message]
2008-06-30  2:21               ` Daniel Barkalow
2008-06-30  3:47               ` Daniel Barkalow
2008-06-30 11:57                 ` Johannes Schindelin
2008-06-30 16:47                   ` Daniel Barkalow
2008-06-30  6:20           ` Junio C Hamano
2008-06-30  6:25             ` Junio C Hamano
2008-06-30  6:40               ` Jeff King
2008-06-30  6:44                 ` Junio C Hamano
2008-06-30 11:37             ` Johannes Schindelin
2008-06-27 17:11 ` Using url.insteadOf in git-clone Junio C Hamano
2008-06-29 18:59   ` Pieter de Bie

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=7vabh390sc.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=barkalow@iabervon.org \
    --cc=git@vger.kernel.org \
    --cc=pdebie@ai.rug.nl \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).