git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Stefan Beller <sbeller@google.com>,
	git@vger.kernel.org, jonathantanmy@google.com
Subject: Re: [PATCH] RFC: Introduce '.gitorderfile'
Date: Wed, 12 Jul 2017 23:03:07 +0200	[thread overview]
Message-ID: <878tjtz7uc.fsf@gmail.com> (raw)
In-Reply-To: <xmqqinix1j29.fsf@gitster.mtv.corp.google.com>


On Wed, Jul 12 2017, Junio C. Hamano jotted:

> Stefan Beller <sbeller@google.com> writes:
>
>>   I want to force myself to think about the design before pointing out
>>   memory leaks and coding style, so the least I would wish for is:
>>     *.h
>>     *.c
>>   but as we have more to look at, I would want to have the most abstract
>>   thing to come first. And most abstract from the actual code is the
>>   user interaction, the documentation.
>
> This is exactly why I invented the orderfile in the first place.
> But such a "policy" is not something a project would want to enforce
> its users all the time; it is left to personal preference of the
> participants.
>
> Just set diff.orderFile to suit your taste without bothering other
> people, I would say.

I very much like Stefan's approach here[1]. It's very useful to be able
to set something like this in a config on a project-wide basis, so that
wherever patches are reviewed (in Gitweb, Git[hub|lab], git-format-patch
etc.) they look as the project prefers.

As Stefan points out we're already accomplishing this with Documentation
as a result of a hack.

But I see why you'd be concerned about this. If you're looking at random
git repos there's a limit to what we'd like to allow them to customize
without causing confusion. The diff order is relatively innocent, but
you might make the case that other diff settings should be adjusted too
(e.g. -U0 on certain file types), and that's quite the rabbit hole.

Still, I think this is innocuous enough to stright the right balance
between intrusion and usability. Some would find this *very* useful,
think projects that for whatever reason need to commit e.g. verbose XML
config along with their code, and the framework they're using happens to
rely on conf/ and src/ directories.

1. Although nit: let's call it .gitorder not .gitorderfile, that it's a
   file is implicit. We don't have .gitignorefile, .gitattributesfile
   etc.

      parent reply	other threads:[~2017-07-12 21:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-11 23:38 [PATCH] RFC: Introduce '.gitorderfile' Stefan Beller
2017-07-12 20:44 ` Junio C Hamano
2017-07-12 20:57   ` Jeff King
2017-07-12 21:08     ` Stefan Beller
2017-07-13 15:59       ` Jeff King
2017-07-13 17:30         ` Stefan Beller
2017-07-13 17:32           ` Brandon Williams
2017-07-13 19:12           ` Junio C Hamano
2017-07-13 19:20             ` Stefan Beller
2017-07-13 20:47               ` Junio C Hamano
2017-07-12 23:54     ` Junio C Hamano
2017-07-13 16:00       ` Jeff King
2017-07-12 20:58   ` Stefan Beller
2017-07-12 21:37     ` Junio C Hamano
2017-07-12 21:55       ` Stefan Beller
2017-07-12 21:03   ` Ævar Arnfjörð Bjarmason [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=878tjtz7uc.fsf@gmail.com \
    --to=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jonathantanmy@google.com \
    --cc=sbeller@google.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).