git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v7 1/4] notes: document cat_sort_uniq rewriteMode

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 14, 2015, 22:11 UTC
Message-ID
<xmqq4mk1h66i.fsf@gitster.dls.corp.google.com>
In-Reply-To
<1439586835-15712-2-git-send-email-jacob.e.keller@intel.com>
Jacob Keller <jacob.e.keller@intel.com> writes:
Show 29 quoted lines
> diff --git a/Documentation/config.txt b/Documentation/config.txt
> index 75ec02e8e90a..de67ad1fdedf 100644
> --- a/Documentation/config.txt
> +++ b/Documentation/config.txt
> @@ -1947,8 +1947,8 @@ notes.rewriteMode::
>  	When copying notes during a rewrite (see the
>  	"notes.rewrite.<command>" option), determines what to do if
>  	the target commit already has a note.  Must be one of
> -	`overwrite`, `concatenate`, or `ignore`.  Defaults to
> -	`concatenate`.
> +	`overwrite`, `concatenate`, `cat_sort_uniq`, or `ignore`.
> +	Defaults to `concatenate`.
>  +
>  This setting can be overridden with the `GIT_NOTES_REWRITE_MODE`
>  environment variable.
> diff --git a/Documentation/git-notes.txt b/Documentation/git-notes.txt
> index 851518d531b5..674682b34b83 100644
> --- a/Documentation/git-notes.txt
> +++ b/Documentation/git-notes.txt
> @@ -331,7 +331,8 @@ environment variable.
>  notes.rewriteMode::
>  	When copying notes during a rewrite, what to do if the target
>  	commit already has a note.  Must be one of `overwrite`,
> -	`concatenate`, and `ignore`.  Defaults to `concatenate`.
> +	`concatenate`, `cat_sort_uniq`, or `ignore`.  Defaults to
> +	`concatenate`.
>  +
>  This setting can be overridden with the `GIT_NOTES_REWRITE_MODE`
>  environment variable.

This obviously is not a problem introduced by this patch, but I wonder why we have two similar but different set of modes for rewrtie and merge. Isn't 'overwrite' like 'ours', 'ignore' like 'theirs', and 'concat' like 'union', and if these are similar enough, perhaps it would be helpful to the end user if we unified the terms (or accepted both as synonyms for backward compatibility)?

Also I notice that you cannot manually reconcile while rewriting; don't we want to have 'manual' there, too, I wonder?

[jc: Cc'ed Thomas who invented rewrite back when merge was not even there, and Johan who added merge]

Previous: Jacob KellerNext: Jacob Keller
Message 3 of 16 in “notes.mergestrategy option(s)”
  1. 0/4 notes.mergestrategy option(s)Jacob Keller, Aug 14, 2015
  2. 1/4 notes: document cat_sort_uniq rewriteModeJacob Keller, Aug 14, 2015
  3. Junio C HamanoAug 14, 2015
  4. Jacob KellerAug 14, 2015
  5. Johan HerlandAug 15, 2015
  6. 2/4 notes: add tests for --commit/--abort/--strategy exclusivityJacob Keller, Aug 14, 2015
  7. 3/4 notes: add notes.mergestrategy option to select default strategyJacob Keller, Aug 14, 2015
  8. Johan HerlandAug 15, 2015
  9. 4/4 notes: teach git-notes about notes.<ref>.mergestrategy optionJacob Keller, Aug 14, 2015
  10. Junio C HamanoAug 14, 2015
  11. Eric SunshineAug 14, 2015
  12. Jacob KellerAug 14, 2015
  13. Junio C HamanoAug 17, 2015
  14. Jacob KellerAug 14, 2015
  15. Junio C HamanoAug 17, 2015
  16. Johan HerlandAug 15, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.