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

Re: Implementing $Date$ substitution - problem with git status

From
Peter Krefting <peter@softwolves.pp.se>
Date
Aug 12, 2009, 06:54 UTC
Message-ID
<alpine.DEB.2.00.0908120751500.30907@ds9.cixit.se>
In-Reply-To
<200908092252.58363.j6t@kdbg.org>
Johannes Sixt:
>> Doing "git reset --hard" or "git checkout master filename" does not 
>> help, the file is still believed to be modified by git.
> Now, that's an entirely different problem, and I think that there is a 
> bug. I have observed this as well with my own clean filter sometimes, but 
> not always. I haven't found a recipe that reliably exhibits the problem.

After som examination, it seems to be caused by the way I imported the CVS history: I kept all the $ keywords expanded in history (so that if I check out an old version from Git, it looks like it did in CVS). This means that still in the latest revision of several files, I have "$Id$" lines checked in in CVS format.

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.

I can probably work around this by removing the "$Id$" attributes, or by removing the "ident" rule.

-- 
\\// Peter - http://www.softwolves.pp.se/
Previous: Peter KreftingNext: Peter Krefting
Message 4 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.