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

Re: Clean up stale .gitignore and .gitattribute patterns

From
Sebastian Schuberth <sschuberth@gmail.com>
Date
Jun 26, 2023, 16:42 UTC
Message-ID
<CAHGBnuMjCsMetCJfhfDXb7aYttgUOc0WY+wJ_Q-tmoV4WES-pQ@mail.gmail.com>
In-Reply-To
<xmqqo7l25ibw.fsf@gitster.g>
On Mon, Jun 26, 2023 at 5:55 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 7 quoted lines
> > PS: As a future idea, it might be good if "git mv" gives a hint about
> > updating .gitattributes if files matching .gitattributes pattern are
> > moved.
>
> Interesting.  "git mv hello.jpg hello.jpeg" would suggest updating
> a "*.jpg <list of attribute definitions>" line in the .gitattributes
> to begin with "*.jpeg"?

Yes, right. Or as a simpler variant to start with (as patterns might match files in different directories, and not all of the matching files might be moved), just say that a specific .gitattributes line needs updating (or needs to be duplicated / generalized in case files in both the old and new location match).

-- 
Sebastian Schuberth
Previous: Junio C HamanoNext: Jeff King
Message 7 of 9 in “Clean up stale .gitignore and .gitattribute patterns”
  1. Sebastian SchuberthJun 23, 2023
  2. Junio C HamanoJun 23, 2023
  3. Jeff KingJun 24, 2023
  4. Jeff KingJun 24, 2023
  5. Sebastian SchuberthJun 26, 2023
  6. Junio C HamanoJun 26, 2023
  7. Sebastian SchuberthJun 26, 2023
  8. Jeff KingJun 27, 2023
  9. Sebastian SchuberthJun 27, 2023

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.