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

Re: git smudge filter fails

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 15, 2016, 16:48 UTC
Message-ID
<xmqqfuvr8z6i.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<CAH8BJxHvg1cnzdsnVsHLYm2BAoqNxp8-mNyVxRy4CHqv0rgN6g@mail.gmail.com>
Stephen Morton <stephen.c.morton@gmail.com> writes:
Show 5 quoted lines
> It's perhaps beyond the scope of my original question, but for
> situations where I need a "last change date" embedded in a file (e.g.
> because a protocol standard requires it), is there any recommended way
> to do so? We've the hard way that hardcoding makes
> merging/cherry-picking a bit of a nightmare and should be avoided.

Does that "last change date" have to be embedded in a file with other stuff in there, or can it be a standalone file by itself (which may be used by other things via linking or inclusion)?

If it can be a standalone file, a custom ll-merge driver that knows how yoru datestring looks like and takes the later of the versions in the two branches being merged would not be too hard to write to eliminate the "nightmare", I would think.

Previous: Stephen Morton
Message 7 of 7 in “git smudge filter fails”
  1. Stephen MortonMar 9, 2016
  2. Jeff KingMar 10, 2016
  3. Stephen MortonMar 10, 2016
  4. Jeff KingMar 10, 2016
  5. Junio C HamanoMar 10, 2016
  6. Stephen MortonMar 15, 2016
  7. Junio C HamanoMar 15, 2016

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.