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

Re: ms/customizable-ident-expansion

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 8, 2021, 20:01 UTC
Message-ID
<xmqqwnlito0b.fsf@gitster.g>
In-Reply-To
<211108.864k8mfocg.gmgdl@evledraar.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 13 quoted lines
> On Sun, Nov 07 2021, Maksym Sobolyev wrote:
>
>> Junio, well it works and passes Occam Razor test. I even added a
>> reasonable number of test cases. As I tried to explain at least once,
>> having it per-directory might be advantageous, if the project pulls
>> sources from all different places where you might "mute" ID
>> replacement for certain parts of the tree or use a different one. Most
>> of that would have to be thrown away if the feature is to be reworked
>> to your liking.
>
> Yes, isn't there also a practical use for this in the source trees of
> the various *BSDs who import each other's sources (but I don't know if
> it's useful for that).

What are the users trying to record with that, though? If FreeBSD source tree wants to keep the sign that some things originated from OpenBSD, wouldn't they want to keep the OpenBSD marking intact? At that point, storing $OpenBSD$ and expanding to $OpenBSD: <blob>$ is not what they want, as the object name will keep changing.

Also, these users need to be aware which path uses what identifier by looking at .gitattributes and what the ident attribute says. If you add $Id$ to a new file, but the .gitattribute entry that covers it says $FreeBSD$ will be the one expanded for that file, nothing will happen until you realize your mistake. I am hesitant to adopt that proposal because dealing with that kind of confusion is not something worth spending time of developers (I mean those who have to figure out and decide between $Id$ and $FreeBSD$, not the developer cycle of Git project).

So...
Previous: Ævar Arnfjörð Bjarmason
Message 11 of 11 in “What's cooking in git.git (Oct 2021, #07; Fri, 29)”
  1. Junio C HamanoOct 30, 2021
  2. ab/config-based-hooks-2 (was: What's cooking in git.git (Oct 2021, #07; Fri, 29))Ævar Arnfjörð Bjarmason, Nov 1, 2021
  3. Junio C HamanoNov 1, 2021
  4. ab/only-single-progress-at-once (was: What's cooking in git.git (Oct 2021, #07; Fri, 29))Ævar Arnfjörð Bjarmason, Nov 1, 2021
  5. tb/plug-pack-bitmap-leaks (was: What's cooking in git.git (Oct 2021, #07; Fri, 29))Ævar Arnfjörð Bjarmason, Nov 1, 2021
  6. tp/send-email-completion (was: What's cooking in git.git (Oct 2021, #07; Fri, 29))Ævar Arnfjörð Bjarmason, Nov 1, 2021
  7. js/scalar (was: What's cooking in git.git (Oct 2021, #07; Fri, 29))Ævar Arnfjörð Bjarmason, Nov 1, 2021
  8. ms/customizable-ident-expansion (was: What's cooking in git.git (Oct 2021, #07; Fri, 29))Ævar Arnfjörð Bjarmason, Nov 1, 2021
  9. Junio C HamanoNov 1, 2021
  10. Ævar Arnfjörð BjarmasonNov 8, 2021
  11. Junio C HamanoNov 8, 2021

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.