git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jacob Keller <jacob.keller@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Johan Herland <johan@herland.net>,
	Jacob Keller <jacob.e.keller@intel.com>,
	Git mailing list <git@vger.kernel.org>,
	Michael Haggerty <mhagger@alum.mit.edu>,
	Eric Sunshine <sunshine@sunshineco.com>
Subject: Re: [PATCH v4 4/4] notes: teach git-notes about notes.<ref>.merge option
Date: Wed, 12 Aug 2015 15:51:50 -0700	[thread overview]
Message-ID: <CA+P7+xqa-DFHhoCvi4qRhPNGDpAmb9T3k28GOwuW6gzc4VfPbQ@mail.gmail.com> (raw)
In-Reply-To: <xmqqmvxwjfjb.fsf@gitster.dls.corp.google.com>

On Wed, Aug 12, 2015 at 3:41 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Jacob Keller <jacob.keller@gmail.com> writes:
>
>> I spoke to soon. We have an "init_notes_check" function which shows
>> that it does refuse to merge outside of refs/notes/* It prevents all
>> notes operations outside of refs/notes
>
> OK.  Then it is OK to limit notes.<ref>.mergestrategy so that <ref>
> refers to what comes after refs/notes/, because we will not allow
> merging to happen outside the hierarchy.
>
> If you are planning to break that promise, however, <ref> must be
> always spelled fully (i.e. with refs/notes/ prefix for those inside
> the hierarchy) to avoid ambiguity.  Otherwise it will be hard to
> interpret a configuration that does something like this (note that
> these could come from multiple places, e.g. $HOME/.gitconfig and
> $GIT_DIR/config):
>

Agreed. Today, we do not allow any notes operations at all that
function outside of refs/notes/*

I suggest we enforce that all configs for merge strategy must be the
unqualified notation, and not allow the variance of refs/notes/* and
such that DWIM does on the command line.

>     [notes "commits"]
>         mergestrategy = concatenate
>     [notes "notes/commits"]
>         mergestrategy = cat_sort_uniq
>     [notes "refs/notes/commits"]
>         mergestrategy = overwrite
>
> The three entries in the above example obviously are all meant to
> refer to the same refs/notes/commits notes tree, and the usual "last
> one wins" rule should apply.  But with the recent git_config_get_*()
> interface, you cannot tell which one among them was given the last,
> overriding the previous entries.

Ya, I'd like to avoid this if possible.

Regards,
Jake

      reply	other threads:[~2015-08-12 22:52 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-11 20:57 [PATCH v4 0/4] add notes strategy configuration options Jacob Keller
2015-08-11 20:57 ` [PATCH v4 1/4] notes: document cat_sort_uniq rewriteMode Jacob Keller
2015-08-12  0:35   ` Johan Herland
2015-08-11 20:57 ` [PATCH v4 2/4] notes: add tests for --commit/--abort/--strategy exclusivity Jacob Keller
2015-08-12  0:36   ` Johan Herland
2015-08-11 20:57 ` [PATCH v4 3/4] notes: add notes.merge option to select default strategy Jacob Keller
2015-08-12  0:04   ` Johan Herland
2015-08-11 20:57 ` [PATCH v4 4/4] notes: teach git-notes about notes.<ref>.merge option Jacob Keller
2015-08-12  0:11   ` Eric Sunshine
2015-08-12  0:34   ` Johan Herland
2015-08-12  2:26     ` Junio C Hamano
2015-08-12 19:05       ` Jacob Keller
2015-08-12 19:09         ` Junio C Hamano
2015-08-12 19:16           ` Jacob Keller
2015-08-12 21:43             ` Jacob Keller
2015-08-12 22:04               ` Johan Herland
2015-08-12 21:46       ` Johan Herland
2015-08-12 21:57         ` Jacob Keller
2015-08-12 22:03           ` Jacob Keller
2015-08-12 22:41             ` Junio C Hamano
2015-08-12 22:51               ` Jacob Keller [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=CA+P7+xqa-DFHhoCvi4qRhPNGDpAmb9T3k28GOwuW6gzc4VfPbQ@mail.gmail.com \
    --to=jacob.keller@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jacob.e.keller@intel.com \
    --cc=johan@herland.net \
    --cc=mhagger@alum.mit.edu \
    --cc=sunshine@sunshineco.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).