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

Problems with filters and git status - reproduction steps

From
Peter Krefting <peter@softwolves.pp.se>
Date
Aug 12, 2009, 08:36 UTC
Message-ID
<alpine.DEB.2.00.0908120856110.30907@ds9.cixit.se>
In-Reply-To
<alpine.DEB.2.00.0908120751500.30907@ds9.cixit.se>
Peter Krefting:
> However, as I have set the "ident" attribute, Git wants to expand it itself 
> and check in files with "$Id$". When I do a reset, it seems it records the 
> entry as clean against a version stored with just "$Id$", but the record in 
> history has an expanded "$Id$", and the entry is thus never deemed clean.

Actually, that is not the case. It seems to be the filter that causes the problems, all by itself. I cannot seem to reproduce this *reliably*. I tried setting up a minimal repository and a reproduction recipe, but I get different behaviour when I perform the steps manually, and when I run it from a shell script.

Here is the reproduction recipe:

#!/bin/bash # Reproduction recipe for $Date$ dirty issue

ORIGINREPO=git://git.debian.org/users/peterk/gitfilterproblem.git DESTINATIONREPO=gitfilterproblem-testrepo

# Set up repository echo -- Cloning git clone ${ORIGINREPO} ${DESTINATIONREPO} cd ${DESTINATIONREPO}

# Status should be clean echo -- After cloning, status should be clean git status

# Set up filter echo -- Set up filter, status should be clean ./reposetup.sh git status

# Create tracking branch echo -- Create tracking branch for changed file, status should be clean git branch --track changed-text-files origin/changed-text-files git status

# Merge the branch echo -- Merge the changes from the branch, now status gets unclean git merge changed-text-files echo git status git diff

-- 
\\// Peter - http://www.softwolves.pp.se/
Previous: Peter KreftingNext: Michael J Gruber
Message 5 of 8 in “Implementing $Date$ substitution - problem with git status”
  1. Peter KreftingAug 9, 2009
  2. Johannes SixtAug 9, 2009
  3. Peter KreftingAug 10, 2009
  4. Peter KreftingAug 12, 2009
  5. Problems with filters and git status - reproduction stepsPeter Krefting, Aug 12, 2009
  6. Michael J GruberAug 12, 2009
  7. Peter KreftingAug 12, 2009
  8. Implementing $Date$ substitution - solution using pre-commitPeter Krefting, Aug 13, 2009

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.