git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: phillip.wood123@gmail.com
To: Junio C Hamano <gitster@pobox.com>,
	Phillip Wood via GitGitGadget <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Phillip Wood <phillip.wood@dunelm.org.uk>,
	Elijah Newren <newren@gmail.com>
Subject: Re: [PATCH 3/4] merge options: add a conflict style member
Date: Fri, 8 Mar 2024 16:13:44 +0000	[thread overview]
Message-ID: <48b2d5b1-a59f-44c3-94ba-e7f81913b7f5@gmail.com> (raw)
In-Reply-To: <xmqqle6shgkw.fsf@gitster.g>

Hi Junio

On 08/03/2024 15:46, Junio C Hamano wrote:
> "Phillip Wood via GitGitGadget" <gitgitgadget@gmail.com> writes:
> 
>> diff --git a/merge-ll.c b/merge-ll.c
>> index 6570707297d..bf1077ae092 100644
>> --- a/merge-ll.c
>> +++ b/merge-ll.c
>> ..
>> -#define LL_MERGE_OPTIONS_INIT {0}
>> +#define LL_MERGE_OPTIONS_INIT { .conflict_style = -1 }
> 
> Makes sense, and this obviously makes the previous step worth doing.
> 
> It looks quite wrong that low-level merge options definition is
> hosted in a file whose name is merge low-level.  Is it too late to
> rename the file to fix this, by the way?

I agree it is confusing, Elijah renamed it from ll-merge.c relatively
recently 6723899932e (merge-ll: rename from ll-merge, 2023-05-16). It
looks like the idea was to group it with the other merge* files:

     merge-ll: rename from ll-merge
     
     A long term (but rather minor) pet-peeve of mine was the name
     ll-merge.[ch].  I thought it made it harder to realize what stuff was
     related to merging when I was working on the merge machinery and trying
     to improve it.
     
     Further, back in d1cbe1e6d8a ("hash-ll.h: split out of hash.h to remove
     dependency on repository.h", 2023-04-22), we have split the portions of
     hash.h that do not depend upon repository.h into a "hash-ll.h" (due to
     the recommendation to use "ll" for "low-level" in its name[1], but which
     I used as a suffix precisely because of my distaste for "ll-merge").
     When we discussed adding additional "*-ll.h" files, a request was made
     that we use "ll" consistently as either a prefix or a suffix.  Since it
     is already in use as both a prefix and a suffix, the only way to do so
     is to rename some files.
     
     Besides my distaste for the ll-merge.[ch] name, let me also note that
     the files
       ll-fsmonitor.h, ll-hash.h, ll-merge.h, ll-object-store.h, ll-read-cache.h
     would have essentially nothing to do with each other and make no sense
     to group.  But giving them the common "ll-" prefix would group them.  Using
     "-ll" as a suffix thus seems just much more logical to me.  Rename
     ll-merge.[ch] to merge-ll.[ch] to achieve this consistency, and to
     ensure we get a more logical grouping of files.
     
     [1] https://lore.kernel.org/git/kl6lsfcu1g8w.fsf@chooglen-macbookpro.roam.corp.google.com/


Best Wishes

Phillip


  reply	other threads:[~2024-03-08 16:14 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-08 14:14 [PATCH 0/4] checkout: cleanup --conflict= Phillip Wood via GitGitGadget
2024-03-08 14:14 ` [PATCH 1/4] xdiff-interface: refactor parsing of merge.conflictstyle Phillip Wood via GitGitGadget
2024-03-08 14:14 ` [PATCH 2/4] merge-ll: introduce LL_MERGE_OPTIONS_INIT Phillip Wood via GitGitGadget
2024-03-08 14:14 ` [PATCH 3/4] merge options: add a conflict style member Phillip Wood via GitGitGadget
2024-03-08 15:46   ` Junio C Hamano
2024-03-08 16:13     ` phillip.wood123 [this message]
2024-03-08 16:48       ` Junio C Hamano
2024-03-09  4:33         ` Elijah Newren
2024-03-09  5:46           ` Junio C Hamano
2024-03-08 14:14 ` [PATCH 4/4] checkout: cleanup --conflict=<style> parsing Phillip Wood via GitGitGadget
2024-03-08 16:15   ` Junio C Hamano
2024-03-08 16:22     ` phillip.wood123
2024-03-08 21:40       ` Junio C Hamano
2024-03-11 14:36     ` phillip.wood123
2024-03-11 17:41       ` Junio C Hamano
2024-03-12 15:50         ` Phillip Wood
2024-03-08 15:44 ` [PATCH 0/4] checkout: cleanup --conflict= Junio C Hamano
2024-03-08 16:07   ` phillip.wood123
2024-03-14 17:05 ` [PATCH v2 0/5] " Phillip Wood via GitGitGadget
2024-03-14 17:05   ` [PATCH v2 1/5] xdiff-interface: refactor parsing of merge.conflictstyle Phillip Wood via GitGitGadget
2024-03-14 17:19     ` Junio C Hamano
2024-03-14 17:05   ` [PATCH v2 2/5] merge-ll: introduce LL_MERGE_OPTIONS_INIT Phillip Wood via GitGitGadget
2024-03-14 17:05   ` [PATCH v2 3/5] merge options: add a conflict style member Phillip Wood via GitGitGadget
2024-03-14 17:21     ` Junio C Hamano
2024-03-14 17:05   ` [PATCH v2 4/5] checkout: cleanup --conflict=<style> parsing Phillip Wood via GitGitGadget
2024-03-14 17:24     ` Junio C Hamano
2024-03-14 17:05   ` [PATCH v2 5/5] checkout: fix interaction between --conflict and --merge Phillip Wood via GitGitGadget
2024-03-14 17:32     ` Junio C Hamano
2024-03-14 17:07   ` [PATCH v2 0/5] checkout: cleanup --conflict= Phillip Wood

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=48b2d5b1-a59f-44c3-94ba-e7f81913b7f5@gmail.com \
    --to=phillip.wood123@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=gitster@pobox.com \
    --cc=newren@gmail.com \
    --cc=phillip.wood@dunelm.org.uk \
    /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).