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

Re: [PATCH] precious-files.txt: new document proposing new precious file type

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 19, 2024, 17:17 UTC
Message-ID
<xmqq1qadmedv.fsf@gitster.g>
In-Reply-To
<7fc35078-a165-4b3c-96e2-37fbe55e109d@gmail.com>
Phillip Wood <phillip.wood123@gmail.com> writes:
> If you've added a secret then catching it after you've published the
> patch for review is likely to be too late. I agree there are a couple
> of chances to catch it before that though.

Yes, this is one of the two remaining things that still make me a bit worried about the "$.config" syntax.

> Indeed, though "git clean" requires the user to pass a flag before it
> will delete anything does have a dry-run mode to check what's going to
> happen so there is an opportunity for users to avoid accidental
> deletions.
True, too.

The other one that still make me a bit worried about the "$.config" syntax is what I called "the devil you already know" that is applicable only for participants of a project that currently mark precious files as ignored, to avoid the accidental "git add ." of secrets.

I think we already are in agreement that all other points (aside from possible ergonomics preferences and future extensibility, both feel a lot minor) raised during this discussion are in favor of the "$.config" syntax.

> While I can see it would be helpful to settle the syntax question I
> think parsing the new syntax is a relatively small part of the work
> that needs to be done to implement precious files.

True. The parser can be isolated and it should be relatively easy to revamp. My current preference is to (at least) tentatively agree on using the "$.config" syntax, which would allow us to update dir.c:parse_path_pattern(), and that would make it possible for us to start adjusting dir.c:is_excluded(), adding is_precious() next to it, and adjusting all current callers of the former.

Thanks.
Previous: Phillip WoodNext: Elijah Newren
Message 13 of 15 in “precious-files.txt: new document proposing new precious file type”
  1. precious-files.txt: new document proposing new precious file typeElijah Newren via GitGitGadget, Dec 27, 2023
  2. Junio C HamanoDec 27, 2023
  3. Elijah NewrenDec 27, 2023
  4. Junio C HamanoDec 27, 2023
  5. Sebastian ThielJan 18, 2024
  6. Junio C HamanoJan 18, 2024
  7. Sebastian ThielJan 18, 2024
  8. Elijah NewrenJan 19, 2024
  9. Sebastian ThielJan 19, 2024
  10. Junio C HamanoJan 19, 2024
  11. Elijah NewrenJan 19, 2024
  12. Phillip WoodJan 19, 2024
  13. Junio C HamanoJan 19, 2024
  14. Elijah NewrenJan 24, 2024
  15. Sebastian ThielFeb 11, 2024

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.