git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org, Thomas Rast <trast@student.ethz.ch>,
	Phil Haack <haacked@gmail.com>
Subject: Re: [PATCH] t1300: document some aesthetic failures of the config editor
Date: Fri, 29 Mar 2013 13:00:31 -0700	[thread overview]
Message-ID: <7vd2uinfhc.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <7vobe2nins.fsf@alter.siamese.dyndns.org> (Junio C. Hamano's message of "Fri, 29 Mar 2013 11:51:51 -0700")

Junio C Hamano <gitster@pobox.com> writes:

> ...  If we _were_ to remove the section header at this point,
> we should be removing the comment two out of three cases (if it is
> about section.key, it should go when section.key goes; if it is
> about section, it should go when section goes; if it is a more
> generic comment about this configuration file, it should stay).

The last case should end more like this:

	..., it should stay, but why are you writing a comment that
	is not specific to this section _inside_ the section in the
	first place???

Another case we have to worry about, if we were to remove an empty
section header is this case:

	# Now, let's list all the remotes I interact with.

        # This is where I push all the separate topics.
        [remote "github"]
		# fetch like everybody else without auth
		url = git://github.com/user/git
		# push with auth
                pushURL = github.com:user/git
		# publish the state of my primary working area as-is
                mirror

	# Traditional "canonical" one
	[remote "korg"]
        	url = k.org:/pub/scm/user/git

If I were to retire "github" account, removing the section while
keeping the comments would be confusing (I do not push all the
separate topics to korg).  Removing the section while removing the
comments that pertain to the section is impossible; "Now, let's list
all the remotes" should stay, "This is where I push" should go.

Removing only the keys and keeping the skelton around would give us:

	# Now, let's list all the remotes I interact with.

        # This is where I push all the separate topics.
        [remote "github"]
		# fetch like everybody else without auth
		# push with auth
		# publish the state of my primary working area as-is

	# Traditional "canonical" one
	[remote "korg"]
        	url = k.org:/pub/scm/user/git

which is still confusing, but at least the confusion is not spread
to adjacent sections.

  parent reply	other threads:[~2013-03-29 20:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-29 16:29 Minor bug in git branch --set-upstream-to adding superfluous branch section to config Phil Haack
2013-03-29 17:00 ` Jeff King
2013-03-29 17:20   ` Thomas Rast
2013-03-29 17:23     ` Jeff King
2013-03-29 17:50       ` [PATCH] t1300: document some aesthetic failures of the config editor Jeff King
2013-03-29 18:51         ` Junio C Hamano
2013-03-29 19:51           ` Jeff King
2013-03-29 20:35             ` Junio C Hamano
2013-03-30  0:21               ` Jeff King
2018-03-28 16:33             ` Johannes Schindelin
2018-03-28 17:59               ` Jeff King
2013-03-29 20:00           ` Junio C Hamano [this message]
2013-03-29 17:27 ` Minor bug in git branch --set-upstream-to adding superfluous branch section to config Junio C Hamano

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=7vd2uinfhc.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=haacked@gmail.com \
    --cc=peff@peff.net \
    --cc=trast@student.ethz.ch \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).