git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Chris Zehner via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Chris Zehner <cbzehner@gmail.com>
Subject: Re: [PATCH 0/1] gitignore: ignore comments on the same line as a pattern
Date: Wed, 02 Oct 2019 15:51:15 +0900	[thread overview]
Message-ID: <xmqqtv8rej30.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <pull.370.git.gitgitgadget@gmail.com> (Chris Zehner via GitGitGadget's message of "Tue, 01 Oct 2019 20:13:12 -0700 (PDT)")

"Chris Zehner via GitGitGadget" <gitgitgadget@gmail.com> writes:

> Why make this change?
> =====================
>
> Add the ability to use # to put comments after ignore patterns. This is
> useful for documenting the reason for particular ignore patterns inclusion
> and structure.
>
> Right now a common convention in .gitignore files is to group patterns by
> similarity, using new lines beginning with one or more # characters as
> headings to explain these groupings. This works well when clarifying why
> broad classes of things are ignored, e.g. # build artifacts followed by
> several patterns.
>
> When leaving comments about a particular pattern it can be difficult to
> distinguish comments about a single patterns from comments used for file
> organization.

Not a good enough justification to break backward compatibility, I
would have to say.  If a single line is so tricky to deserve its own
comment, perhaps a group of lines can be separated with the next
group by a handful of blank lines for clarity (or the project can
adopt a convention that differentiates between comments on a group
and comments on an individual rule).

      parent reply	other threads:[~2019-10-02  6:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-02  3:13 [PATCH 0/1] gitignore: ignore comments on the same line as a pattern Chris Zehner via GitGitGadget
2019-10-02  3:13 ` [PATCH 1/1] " Chris Zehner via GitGitGadget
2019-10-02  7:02   ` Junio C Hamano
2019-10-02  6:51 ` Junio C Hamano [this message]

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=xmqqtv8rej30.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=cbzehner@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    /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).