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

Re: Problems with filters and git status - reproduction steps

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Aug 12, 2009, 08:55 UTC
Message-ID
<4A828368.5010206@drmicha.warpmail.net>
In-Reply-To
<alpine.DEB.2.00.0908120856110.30907@ds9.cixit.se>
Peter Krefting venit, vidit, dixit 12.08.2009 10:36:
Show 16 quoted lines
> 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
I get "Changed but not updated" already here!

Also, what's your git version? There have been some fix-ups recently regarding the interaction between filters/textconv and assumptions of the code about dirtiness of the worktree.

Show 12 quoted lines
> 
> # 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

Do you really want the date in the checked-in version of the file? I would assume otherwise. Then your clean filter should really be the smudge filter, and you would need a clean filter to go with it (remove the date and restore the keyword).

Michael
Previous: Peter KreftingNext: Peter Krefting
Message 6 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.